Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Theme

Theme values for Spectra decks.

Themes are ordinary immutable Prism data. The Typst backend is the only place that interprets these values as concrete page and text settings, so a custom theme is a record update away from a built-in one:

fn main() =
  println(prism_theme.name)
  println(Theme { ..prism_theme, name = "mine" }.name)
prism
mine

Types

Theme

type Theme = Theme {
  name: String,
  background: String,
  foreground: String,
  accent: String,
  muted: String,
  code_background: String,
  code_foreground: String,
  text_font: String,
  code_font: String,
  title_size: Int,
  body_size: Int,
  code_size: Int,
  margin_pt: Int
} deriving (Eq, Show)

Functions and Values

prism_theme

prism_theme : Theme

The default Spectra theme: a restrained, Beamer-inspired frame on warm paper, using Prism violet for the title rule and no ornamental chrome.

paper_theme

paper_theme : Theme

Alias-like print theme with a slightly darker accent.

prism_dark_theme

prism_dark_theme : Theme

The original dark Prism palette for code-heavy talks.