magical markdown slides
1# Themes
2
3lantern uses the [Base16](https://github.com/chriskempson/base16) theming system for customizing the appearance of your presentations. Base16 provides a standardized way to define color schemes that work consistently across dark and light backgrounds.
4
5## Base16 Color System
6
7Base16 defines 16 semantic colors (base00 through base0F) that serve specific purposes:
8
9### Background Shades
10
11- **base00-03**: Background colors from darkest to lighter (or lightest to darker in light themes)
12
13### Foreground Shades
14
15- **base04-07**: Foreground colors from darker to lightest (or lightest to darker in light themes)
16
17### Accent Colors
18
19- **base08**: Red (variables, deletion)
20- **base09**: Orange (integers, constants, emphasis)
21- **base0A**: Yellow (classes, list markers)
22- **base0B**: Green (strings, code blocks)
23- **base0C**: Cyan (links, support functions)
24- **base0D**: Blue (functions, headings)
25- **base0E**: Magenta (keywords, strong emphasis)
26- **base0F**: Brown (deprecated, special)
27
28## Color Mapping
29
30lantern maps base16 colors to semantic roles:
31
32### Content Colors
33
34- **Headings** (base0D): Blue accent for slide titles
35- **Body text** (base05): Main foreground color
36- **Strong/Bold** (base0E): Magenta for emphasis
37- **Emphasis/Italic** (base09): Orange for subtle emphasis
38- **Code blocks** (base0B): Green for fenced code
39- **Inline code background** (base02): Selection background
40- **Links** (base0C): Cyan for hyperlinks
41- **Accents** (base08): Red for highlights
42- **List markers** (base0A): Yellow for bullets/numbers
43- **Dimmed elements** (base03): Comments, borders, rules
44
45### UI Chrome Colors
46
47- **UI background** (base00): Status bar and UI backgrounds
48- **UI borders** (base04): Window and panel borders
49- **UI titles** (base06): Bright text for UI elements
50- **UI text** (base07): Brightest text for status bars
51
52## Available Themes
53
54lantern includes 10 prebuilt base16 themes, embedded at compile time:
55
56### Catppuccin
57
58- **catppuccin-mocha** - Dark theme with pastel colors
59- **catppuccin-latte** - Light theme with warm tones
60
61### Gruvbox Material
62
63- **gruvbox-material-dark** - Retro dark theme with warm colors
64- **gruvbox-material-light** - Retro light theme
65
66### Nord
67
68- **nord** - Arctic-inspired dark theme with cool blues
69- **nord-light** - Nord palette adapted for light backgrounds
70
71### Oxocarbon
72
73- **oxocarbon-dark** - IBM's modern dark theme (default)
74- **oxocarbon-light** - IBM's modern light theme
75
76### Solarized
77
78- **solarized-dark** - Ethan Schoonover's precision dark palette
79- **solarized-light** - Solarized adapted for light backgrounds
80
81## Using Themes
82
83### Via Frontmatter
84
85Specify a theme in your slide deck's YAML frontmatter:
86
87```markdown
88---
89theme: catppuccin-mocha
90---
91
92# Your First Slide
93
94Content here
95```
96
97Or with TOML frontmatter:
98
99```markdown
100+++
101theme = "nord"
102+++
103
104# Your First Slide
105```
106
107### Via Command Line
108
109Override the theme with the `--theme` flag:
110
111```bash
112lantern present presentation.md --theme nord
113lantern print presentation.md --theme catppuccin-latte
114```
115
116### Via Environment Variable
117
118Set a default theme using the `LANTERN_THEME` environment variable:
119
120```bash
121export LANTERN_THEME=gruvbox-material-dark
122lantern present presentation.md
123```
124
125## Theme Priority
126
127When multiple theme sources are specified, the priority order is:
128
1291. Command line flag (`--theme`)
1302. Frontmatter metadata (`theme:` field)
1313. Environment variable (`LANTERN_THEME`)
1324. Default theme (nord for dark terminals, nord-light for light terminals)
133
134## Custom Themes (Coming Soon)
135
136Future versions will support loading custom base16 YAML themes from:
137
138- `~/.config/slides/themes/` directory
139- `--theme-file` command line flag
140
141Base16 YAML format:
142
143```yaml
144system: "base16"
145name: "My Custom Theme"
146author: "Your Name"
147variant: "dark" # or "light"
148palette:
149 base00: "#1a1b26"
150 base01: "#16161e"
151 base02: "#2f3549"
152 base03: "#444b6a"
153 base04: "#787c99"
154 base05: "#a9b1d6"
155 base06: "#cbccd1"
156 base07: "#d5d6db"
157 base08: "#c0caf5"
158 base09: "#a9b1d6"
159 base0A: "#0db9d7"
160 base0B: "#9ece6a"
161 base0C: "#b4f9f8"
162 base0D: "#2ac3de"
163 base0E: "#bb9af7"
164 base0F: "#f7768e"
165```
166
167You can find thousands of base16 themes at the [Base16 Gallery](https://tinted-theming.github.io/tinted-gallery/).
168
169## Rendering Features
170
171The printer uses Unicode box-drawing characters for clean visual output:
172
173- `▉ ▓ ▒ ░ ▌` for heading levels (h1-h6)
174- `─` and `═` for horizontal rules
175- `│` for blockquote borders and table dividers
176- `•` for unordered list markers
177
178Tables automatically calculate column widths based on content and available terminal width.
179
180Code blocks support syntax highlighting through [Syntect](https://github.com/trishume/syntect), which automatically adapts to your selected theme's light/dark variant.