Skip to content

Themes

Fern ships with many built-in themes with a growing collection of user-contributed themes.


Switching themes

From the command palette (ctrl+p), search for "theme" and select Themes: Change active Theme.

The active theme is saved in your vault's .fern/config.toml automatically.


Built-in themes

Name Description
dark Default dark theme
light Default light theme

Included themes

All themes listed below are embedded in the Fern binary, so every installation has access to them without any extra setup.

If you place a theme file with the same name in your config themes directory (~/.config/fern/themes/), it will override the built-in theme of that name. This lets you customise a built-in theme without losing the others.

General

Name Style
catppuccin-latte Catppuccin Latte (light)
catppuccin-mocha Catppuccin Mocha (dark)
dracula Dracula (dark)
github-light GitHub Light
gruvbox-dark Gruvbox dark
gruvbox-light Gruvbox light
nord Nord (cool blues)
one-light Atom One Light
solarized-light Solarized Light
tokyo-night Tokyo Night

Pride flag themes

Name Flag
ace Asexual pride
aro Aromantic pride
aroace Aromantic-asexual pride
disability Disability pride
genderfluid Genderfluid pride
intersex Intersex pride
nonbinary Non-binary pride
pan Pansexual pride
polysexual Polysexual pride
progress Progress pride
queer Queer pride
rainbow Rainbow pride
sapphic Sapphic pride
transgender Transgender pride
xenogender Xenogender pride

Creating a custom theme

Custom themes are JSON files placed in ~/.config/fern/themes/. The file name (without .json) becomes the theme name.

A theme file can set colors for individual markdown elements and optionally declare a base of "light" or "dark" to inherit defaults from.

Minimal example (~/.config/fern/themes/my-theme.json):

{
  "base": "dark",
  "markdown": {
    "h1": { "color": "205" },
    "h2": { "color": "170" },
    "h3": { "color": "135" },
    "link": { "color": "81" },
    "code_block": { "theme": "dracula" }
  }
}

Colors are specified as ANSI 256-color codes (strings "0"-"255") or as hex color codes (e.g. "#ff79c6"). The code_block.theme value is a Chroma syntax-highlight theme name.

Markdown element keys

Key What it styles
h1 through h6 Individual heading levels
heading All headings (overridden by h1-h6 if set)
text Body text
link Hyperlinks and wikilinks
item List items
code_block Fenced code blocks (also accepts theme for syntax highlighting)

Contributing a theme

If you have made a theme that you want to share with everyone, submit it as a pull request to the Fern repository.