diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2023-10-03 19:31:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-03 19:31:02 +0200 |
| commit | a4e357fb37d76d32d06ad8cc21e47bb2cc064cfd (patch) | |
| tree | 52e118513218d961cc5e8c713575049cd75a2e95 /tests/typ/visualize/gradient-presets.typ | |
| parent | 6b1233e127d815b38fea9ab909dd4081cdf76ca2 (diff) | |
Gradient Part 2 - Linear gradients (#2279)
Diffstat (limited to 'tests/typ/visualize/gradient-presets.typ')
| -rw-r--r-- | tests/typ/visualize/gradient-presets.typ | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/typ/visualize/gradient-presets.typ b/tests/typ/visualize/gradient-presets.typ new file mode 100644 index 00000000..ca1a7007 --- /dev/null +++ b/tests/typ/visualize/gradient-presets.typ @@ -0,0 +1,33 @@ +// Test all gradient presets. + +--- +#set page(width: 200pt, height: auto, margin: 0pt) +#set text(fill: white, size: 18pt) +#set text(top-edge: "bounds", bottom-edge: "bounds") + +#let presets = ( + ("turbo", color.map.turbo), + ("cividis", color.map.cividis), + ("rainbow", color.map.rainbow), + ("spectral", color.map.spectral), + ("viridis", color.map.viridis), + ("inferno", color.map.inferno), + ("magma", color.map.magma), + ("plasma", color.map.plasma), + ("rocket", color.map.rocket), + ("mako", color.map.mako), + ("vlag", color.map.vlag), + ("icefire", color.map.icefire), + ("flare", color.map.flare), + ("crest", color.map.crest), +) + +#stack( + spacing: 3pt, + ..presets.map(((name, preset)) => block( + width: 100%, + height: 20pt, + fill: gradient.linear(..preset), + align(center + horizon, smallcaps(name)), + )) +) |
