summaryrefslogtreecommitdiff
path: root/tests/typ/visualize/gradient-presets.typ
blob: ca1a70077671f3182cf2b01dab3e6418395cb8da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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)),
  ))
)