RPIC

gradient

rpic extension, inspired by PSTricks’ fillstyle=gradient. gradient "from" "to" fills a shape with a two-stop linear gradient; gradientangle sets the direction in pic coordinates — 0 runs left to right, 90 bottom to top (the same frame as hatchangle).

.PS
box "0°" wid 0.8 ht 0.55 gradient "steelblue" "white"
move right 0.25
box "45°" wid 0.8 ht 0.55 gradient "steelblue" "white" gradientangle 45
move right 0.25
box "90°" wid 0.8 ht 0.55 gradient "steelblue" "white" gradientangle 90
.PE
45° 90°

Rules

.PS
circle rad 0.35 gradient "gold" "orangered" gradientangle 90
move right 0.35
line right 0.9 then up 0.65 close gradient "plum" "indigo" gradientangle 90 outlined "black"
.PE

Design notes: docs/svg-styles.md.