theme-dark
Dark theme: dark grey panel, white grid, dark axis text.
Usage
theme-dark(
ink: _tr-ink,
paper: _tr-paper,
accent: rgb("#3366FF"),
..fields,
)Parameters
| Parameter | Default | Description |
|---|---|---|
ink |
_tr-ink |
Foreground colour (text). Default: black. |
paper |
_tr-paper |
Background colour. Default: white. |
accent |
rgb("#3366FF") |
Accent colour. Default: rgb("#3366FF"). |
..fields |
Extra overrides forwarded to theme; see its docs for the full catalogue of structured and flat keys. |
Returns
Theme dictionary consumed by plot.
Examples
Dark grey panel with light gridlines for high-contrast slides.
#let d = range(0, 10).map(i => (x: i, y: i * 0.5))
#plot(
data: d,
mapping: aes(x: "x", y: "y"),
layers: (geom-point(size: 2pt),),
theme: theme-dark(),
width: 10cm,
height: 6cm,
)Pair the dark theme with a non-default accent for branded slides.
#let d = range(0, 10).map(i => (x: i, y: i * 0.5))
#plot(
data: d,
mapping: aes(x: "x", y: "y"),
layers: (geom-point(size: 2pt),),
theme: theme-dark(accent: rgb("#ffd700")),
width: 10cm,
height: 6cm,
)Drop the panel grid for a starker look while keeping the dark preset.
#let d = range(0, 10).map(i => (x: i, y: i * 0.5))
#plot(
data: d,
mapping: aes(x: "x", y: "y"),
layers: (geom-point(size: 2pt),),
theme: theme-dark(panel-grid: element-blank()),
width: 10cm,
height: 6cm,
)See also
theme-grey, theme-minimal, theme-classic, theme-light, theme-void, theme.