theme-light

Light theme: light grey panel, white grid, soft grey axes.

Usage

theme-light(
  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

Soft grey axes on a tinted panel.

#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-light(),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x on a soft grey panel with white gridlines and muted grey axis lines for a low-contrast look.

Scatter plot of y against x on a soft grey panel with white gridlines and muted grey axis lines for a low-contrast look.

Override accent to give the data ink a custom highlight colour without losing the soft panel.

#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-light(accent: rgb("#1b9e77")),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x on the light theme with a teal-green accent recolouring data ink against the soft grey panel.

Scatter plot of y against x on the light theme with a teal-green accent recolouring data ink against the soft grey panel.

Tinted panel background on top of the soft 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-light(panel-background: element-rect(fill: rgb("#fff7e6"))),
  width: 10cm,
  height: 6cm,
)

Scatter plot of y against x on the light theme with the panel background tinted warm cream over the soft preset.

Scatter plot of y against x on the light theme with the panel background tinted warm cream over the soft preset.

See also

theme-grey, theme-minimal, theme-classic, theme-dark, theme-void, theme.

Back to top