Skip to content

Color & Typography Themes

Slidev Theme Scholarly v2.0 introduces customizable color and typography themes to match your institution's branding or personal preferences.

Color Themes

Choose from 9 professionally designed color palettes:

Classic Academic Blue (Default)

The default theme inspired by traditional academic institutions.

yaml
---
theme: scholarly
# Classic Blue is the default, no additional configuration needed
---

Colors:

  • Primary: #1e3a5f (Deep Academic Blue)
  • Accent: #b8860b (Academic Gold)
  • Background: #fdfbf7 (Warm Ivory)

Oxford Burgundy

Rich burgundy inspired by Oxford University.

yaml
---
theme: scholarly
themeConfig:
  colorTheme: oxford-burgundy
---

Colors:

  • Primary: #862633 (Oxford Burgundy)
  • Accent: #c5a572 (Antique Gold)
  • Background: #faf8f5 (Off-white)

Cambridge Green

Classic green reminiscent of Cambridge University.

yaml
---
theme: scholarly
themeConfig:
  colorTheme: cambridge-green
---

Colors:

  • Primary: #00543c (Cambridge Green)
  • Accent: #d4af37 (Gold)

Yale Blue

Traditional Yale blue for a distinguished look.

yaml
---
theme: scholarly
themeConfig:
  colorTheme: yale-blue
---

Colors:

  • Primary: #0f4d92 (Yale Blue)
  • Accent: #d4af37 (Gold)

Princeton Orange

Vibrant orange for energetic presentations.

yaml
---
theme: scholarly
themeConfig:
  colorTheme: princeton-orange
---

Colors:

  • Primary: #e87722 (Princeton Orange)
  • Accent: #1c1c1c (Black)

Monochrome Professional

Clean, professional grayscale theme.

yaml
---
theme: scholarly
themeConfig:
  colorTheme: monochrome
---

Warm Sepia

Warm, vintage-inspired sepia tones.

yaml
---
theme: scholarly
themeConfig:
  colorTheme: warm-sepia
---

Nordic Blue

Cool, Scandinavian-inspired blue palette.

yaml
---
theme: scholarly
themeConfig:
  colorTheme: nordic-blue
---

High Contrast (Accessibility)

Maximum contrast theme for accessibility needs. WCAG AAA compliant.

yaml
---
theme: scholarly
themeConfig:
  colorTheme: high-contrast
---

Colors:

  • Primary: #000000 (Black)
  • Accent: #0066cc (Blue)
  • Background: #ffffff (White)

Typography Themes

Choose from 8 carefully curated font combinations:

Classic Palatino (Default)

Traditional academic typography with Palatino serif and Helvetica sans.

yaml
---
theme: scholarly
# Classic is the default
---

Fonts:

  • Serif: Palatino Linotype, Book Antiqua, Palatino
  • Sans: Helvetica Neue, Helvetica, Arial

Modern Academica

Contemporary academic styling with Georgia and Source Sans Pro.

yaml
---
theme: scholarly
themeConfig:
  fontTheme: modern
---

Fonts:

  • Serif: Georgia, Cambria
  • Sans: Source Sans Pro, Segoe UI, Roboto

Traditional Garamond

Classic book typography with Garamond.

yaml
---
theme: scholarly
themeConfig:
  fontTheme: traditional
---

Fonts:

  • Serif: Garamond, Baskerville
  • Sans: Gill Sans, Optima, Helvetica

Contemporary Sans

Clean, modern sans-serif focused design.

yaml
---
theme: scholarly
themeConfig:
  fontTheme: contemporary
---

Fonts:

  • Serif: Charter, Georgia, Cambria
  • Sans: Inter, SF Pro Display, Segoe UI

Humanist

Warm, readable humanist typefaces.

yaml
---
theme: scholarly
themeConfig:
  fontTheme: humanist
---

Fonts:

  • Serif: Crimson Text, Libre Baskerville, Georgia
  • Sans: Open Sans, Noto Sans

Technical

LaTeX-inspired technical typography.

yaml
---
theme: scholarly
themeConfig:
  fontTheme: technical
---

Fonts:

  • Serif: Computer Modern, Latin Modern
  • Sans: IBM Plex Sans, Roboto

Elegant Serif

Refined, elegant serif typography.

yaml
---
theme: scholarly
themeConfig:
  fontTheme: elegant
---

Fonts:

  • Serif: Cormorant Garamond, EB Garamond
  • Sans: Montserrat, Lato

Sans Default

Sans-serif focused typography for modern presentations.

yaml
---
theme: scholarly
themeConfig:
  fontTheme: sans-default
---

Fonts:

  • Sans: Inter, SF Pro Display, system-ui
  • Serif: Georgia, Cambria (for fallback)

Combining Themes

You can combine color and typography themes:

yaml
---
theme: scholarly
themeConfig:
  colorTheme: oxford-burgundy
  fontTheme: traditional
  contentMode: light # Ordinary slide and readable content surfaces
  chromeMode: dark   # Header, footer, TOC, and toolbar surfaces
  sectionMode: dark  # Section slide appearance
---

Surface Modes

Control readable slide surfaces, player chrome, and section dividers separately:

OptionControlsValues
contentModeOrdinary slide canvas, quote, code, table, footnotes, Highlight, Block, and Theoremlight, dark
chromeModeHeader, footer, page number, navigation buttons, TOC, and toolbar surfaceslight, dark, match, inverse
sectionModeDefault section slide appearancelight, dark, match, inverse

Legacy colorMode remains a deprecated alias for contentMode. When contentMode is omitted, Scholarly first checks colorMode, then follows Slidev's current light/dark state. For compatibility, legacy colorMode also drives chromeMode when neither contentMode nor chromeMode is set.

Migration Examples

yaml
# Before
themeConfig:
  colorTheme: classic-blue
  colorMode: dark
  sectionMode: dark

# After
themeConfig:
  colorTheme: classic-blue
  contentMode: light
  chromeMode: dark
  sectionMode: dark
yaml
# All-light deck
themeConfig:
  colorTheme: high-contrast
  contentMode: light
  chromeMode: match
  sectionMode: match
yaml
# All-dark deck
themeConfig:
  colorTheme: nordic-blue
  contentMode: dark
  chromeMode: match
  sectionMode: match

Global Defaults

Set it in headmatter:

yaml
---
theme: scholarly
themeConfig:
  contentMode: light
  chromeMode: dark
  sectionMode: dark
---

Priority Chain

contentMode > legacy colorMode > Slidev light/dark state
chromeMode > legacy colorMode when contentMode is absent > 'dark'
sectionMode > 'dark'
ValueDescription
lightLight surfaces with dark text
darkDark surfaces with light text
matchFollow contentMode
inverseInvert contentMode; available for chromeMode and sectionMode

Section Mode

Control the appearance of section layout slides independently:

Global Default

Set a default for all section slides in your headmatter:

yaml
---
theme: scholarly
themeConfig:
  sectionMode: inverse  # light, dark, match, or inverse
---

Per-Slide Override

Override the global setting on individual section slides:

yaml
---
layout: section
sectionMode: dark  # light, dark, match, or inverse
---

# This Section Uses Dark Mode

Priority Chain

Per-slide sectionMode > Global themeConfig.sectionMode > 'dark' (default)
ValueDescription
darkDark gradient background with light text (default)
lightLight background with dark text
matchUse the resolved contentMode
inverseUse the opposite of the resolved contentMode

Custom Colors

Override specific colors while using a theme:

yaml
---
theme: scholarly
themeColors:
  primary: '#your-custom-color'
  accent: '#your-accent-color'
---

Use themeColors for custom colors. Preset values come from the CSS rule selected by themeConfig.colorTheme; explicit themeColors overrides are mirrored to both <html> and <body> so they remain authoritative across Slidev surfaces.

Live Examples

Each color theme has a dedicated example file demonstrating the theme in action:

ThemeCommand
Classic Bluepnpm run dev -- examples/example-classic-blue.md
Oxford Burgundypnpm run dev -- examples/example-oxford.md
Cambridge Greenpnpm run dev -- examples/example-cambridge.md
Yale Bluepnpm run dev -- examples/example-yale.md
Princeton Orangepnpm run dev -- examples/example-princeton.md
Nordic Bluepnpm run dev -- examples/example-nordic.md
Monochromepnpm run dev -- examples/example-monochrome.md
Warm Sepiapnpm run dev -- examples/example-sepia.md
High Contrastpnpm run dev -- examples/example-high-contrast.md

The decks in examples/ use theme: ../ so they work when running Slidev from this repository. If you installed the theme from npm, change it to theme: scholarly.

Implementation Details

Themes are applied using CSS custom properties and data attributes:

  • Color themes use [data-color-theme="theme-name"]
  • Font themes use [data-font-theme="theme-name"]
  • Content mode uses [data-content-mode="dark/light"]
  • Chrome mode uses [data-chrome-mode="dark/light"]
  • Section mode uses [data-section-mode="dark/light"]

data-color-mode is kept as a legacy mirror of data-content-mode.

This allows for seamless theme switching without reloading the presentation.

Semantic Token Groups

Scholarly keeps readable content colors separate from the theme's identity colors. When creating a new color theme or adjusting light/dark behavior, prefer these token groups instead of hard-coded component colors:

Token groupPurposeExamples
Chrome tokensHeader, footer, toolbar, and navigation surfaces--scholarly-chrome-bg, --scholarly-toolbar-hover
Content tokensReadable slide body surfaces, borders, code, quote, and table colors--scholarly-content-surface, --scholarly-code-bg, --scholarly-quote-fg
Accent tokensTheme identity colors provided by color presets or themeColors--slidev-theme-primary, --slidev-theme-primary-light, --scholarly-accent
Semantic tokensVariant-specific readable states for highlights, blocks, and theorems--scholarly-highlight-warning-bg, --scholarly-block-info-border, --scholarly-theorem-definition-accent
Interaction tokensHover, focus, pinned, active, and muted UI feedback--scholarly-toolbar-hover, --scholarly-content-fg-muted

The key rule is that a background token and its foreground token must move together. For example, Highlight uses --scholarly-highlight-*-bg and --scholarly-highlight-*-fg, so a dark highlight background cannot accidentally inherit dark body text in light mode.

Regenerate Theme Screenshots

To export the first 4 slides of every theme example into images/themes/* (and sync to docs/public/images/themes/*), run:

bash
pnpm run export:theme-images