Every Mermaid theme, and when to use it
Mermaid's default palette is built for a preview pane, not for the page your diagram ends up on. These presets restyle the same diagram for README files, dark docs, decks and long-form posts — pick the destination and export.
Standard styles
Free, no signup, no watermark. Every format and every resolution.

Clean Docs
Best for documentation.
A crisp white canvas for technical docs and wiki pages.
Copy this style as themeVariables
---
config:
theme: base
themeVariables:
primaryColor: '#EAFBF8'
primaryTextColor: '#17202A'
primaryBorderColor: '#2EC4B6'
lineColor: '#243447'
secondaryColor: '#F8FAFC'
tertiaryColor: '#FFFFFF'
edgeLabelBackground: '#FFFFFF'
labelTextColor: '#17202A'
fontFamily: 'DM Sans, sans-serif'
---
GitHub README
Best for README files.
Soft GitHub blues that blend into a repository page.
Copy this style as themeVariables
---
config:
theme: base
themeVariables:
primaryColor: '#DDF1FF'
primaryTextColor: '#24292F'
primaryBorderColor: '#0969DA'
lineColor: '#57606A'
secondaryColor: '#F6F8FA'
tertiaryColor: '#FFFFFF'
edgeLabelBackground: '#FFFFFF'
labelTextColor: '#24292F'
fontFamily: 'DM Sans, sans-serif'
---
GitHub Dark
Best for dark READMEs, docs, and slides.
GitHub's dark palette, free, and readable on dark slides with a transparent background.
Copy this style as themeVariables
---
config:
theme: base
themeVariables:
darkMode: true
background: '#0D1117'
mainBkg: '#161B22'
primaryColor: '#161B22'
primaryTextColor: '#E6EDF3'
primaryBorderColor: '#58A6FF'
lineColor: '#8B949E'
secondaryColor: '#161B22'
tertiaryColor: '#21262D'
edgeLabelBackground: '#0D1117'
labelTextColor: '#E6EDF3'
fontFamily: 'DM Sans, sans-serif'
---Advanced styles ✦ Pro
Preview any of them for free. Exporting one needs Pro, or a single credit — signing in gives you 10.

Editorial✦ Pro
Best for blog posts and decks.
One accent on the node that matters, hairline rules, monospace labels, and a generated legend.

Whiteboard Sketch✦ Pro
Best for workshops and architecture notes.
Hand-drawn geometry on warm paper for explainers.

Warm Editorial✦ Pro
Best for long-form posts.
Amber paper for articles and printed handouts.

Aurora Noir✦ Pro
Best for dark docs and product decks.
An obsidian canvas with a mint aurora glow.

Blueprint✦ Pro
Best for engineering diagrams.
Engineering-blueprint blue with luminous cyan connectors.

Champagne✦ Pro
Best for brand and marketing decks.
Warm ivory with refined rose-gold nodes.

Emerald Suite✦ Pro
Best for polished presentations.
A fresh sage-and-emerald palette for decks.
Mermaid's built-in themes
Mermaid 12 ships eleven themes. The classic five are joined by the redux and neo families, and several diagram types changed their default look. Set any of them per diagram with the theme key, or for a whole site with mermaid.initialize().
| Theme | What it looks like and when to use it |
|---|---|
default | The long-standing Mermaid look. Still the default for every diagram type Mermaid 12 did not move to redux-color. |
neutral | Greys only. Made for black-and-white documents that will be printed. |
dark | For dark pages. Pair it with darkMode: true so colours derived from the background are worked out for a dark page. |
forest | Shades of green. |
base | The only theme you can change. Set themeVariables on top of it to build your own palette. |
redux-color | Mermaid 12. Redux geometry and typography with a categorical palette: entities, actors, branches, classes, subgraphs and chart series each get their own colour. The new default for flowchart, sequence, class, ER, state and requirement diagrams. |
redux-dark-color | Mermaid 12. The dark counterpart of redux-color. |
redux | Mermaid 12. The same geometry and type as redux-color in one colour, for when colour should carry a meaning you assign yourself. |
redux-dark | Mermaid 12. The dark counterpart of redux. |
neo | Mermaid 12. A flatter, softer look, meant to be paired with look: neo. |
neo-dark | Mermaid 12. The dark counterpart of neo. |
Set a theme for one diagram
Put a frontmatter block at the top of the diagram. It travels with the code, so GitHub, docs sites and editors render the same theme.
---
config:
theme: forest
---
flowchart LR
A[Write] --> B[Preview] --> C[Export]Get the pre-Mermaid 12 look back
Flowchart, sequence, class, ER, state and requirement diagrams now default to redux-color with the neo look. Name the old theme and look to draw them the way they used to be drawn.
---
config:
theme: default
look: classic
---
sequenceDiagram
Alice->>Bob: HelloSource: the official Mermaid theme configuration docs (Mermaid 12.3).
Styling Mermaid yourself
Every preset here is a set of Mermaid themeVariables. If you would rather keep the styling in your own file, put a frontmatter config block at the top — it travels with the diagram, so GitHub and your docs site render it the same way. The older %%{init}%% directive still renders, but Mermaid has marked it deprecated since 10.5 in favour of frontmatter.
---
config:
theme: base
themeVariables:
primaryColor: '#ffffff'
primaryBorderColor: '#2d3142'
primaryTextColor: '#2d3142'
lineColor: '#4f5d75'
fontFamily: 'Inter, sans-serif'
---
flowchart LR
A[Write] --> B[Preview] --> C[Export]Why the defaults look busy
Mermaid ships a multi-hue palette so every node type is distinguishable in a preview pane. On a page it competes with your text: several saturated fills, thick strokes and a colour per shape.
What these presets change
One accent at most, hairline borders instead of heavy strokes, and a type ramp where labels and edge captions differ in size and weight rather than colour.
Where a config block falls short
It cannot change canvas padding or export resolution — those live in the renderer. That is the part this tool does for you at export time.
Which style for which destination
Docs, wikis and README files
Clean Docs or GitHub README, when the diagram should disappear into the page around it. Both are free and export without a watermark.
A blog post or a slide
Editorial. It picks the one node your diagram is about, colours the path leading to it, and drops everything else to ink and hairlines — the difference between a diagram and a figure.
Workshops and architecture notes
Whiteboard Sketch, when the diagram is part of a story rather than a spec.
Dark documentation
GitHub Dark, free, when the page already looks like GitHub in dark mode. Aurora Noir for a mint glow on obsidian, or Blueprint for engineering blue with cyan connectors.
Any background at all
Turn on Transparent background with any style except Editorial. It drops the canvas and keeps the style, so use a light style on light slides and a dark one, such as GitHub Dark, on dark slides.
Mermaid theme FAQ
How do I change the theme in the Mermaid live editor?+
In mermaid.live, open the Configuration panel and pick a built-in theme there, or set it in the diagram itself with a frontmatter config block (theme: forest, for example). In this editor there is nothing to configure — click a style in the export panel and any of the styles on this page applies instantly, with transparent background and 2x–4x export handled at export time. Beyond the five built-ins, custom looks are a themeVariables job; the free style cards above have copyable configs.
How do I make Mermaid diagrams work in dark mode?+
Use the free GitHub Dark style above: it matches GitHub's dark palette, and with the transparent background turned on the exported PNG sits on dark slides and dark docs without a white box. Inside plain Mermaid there are three dark built-ins: dark, and since Mermaid 12 redux-dark, redux-dark-color and neo-dark. With the dark theme, set darkMode: true as well so colours derived from the background are calculated for a dark page.
How do I customize Mermaid theme variables?+
Start the diagram with a frontmatter block: config, then theme: base, then themeVariables with the values you want — primaryColor, primaryBorderColor, lineColor, and fontFamily do most of the work. Only the base theme can be customised this way. The free style cards above expand into exactly this config, so you can copy one and change the colours.
What themes does Mermaid ship with?+
Eleven, as of Mermaid 12: redux-color, redux-dark-color, redux, redux-dark, default, neutral, dark, forest, neo, neo-dark, and base. The classic five are default, neutral, dark, forest and base; the redux and neo families arrived in Mermaid 12. base is the only one you can customise, so every additional style on this page is a set of themeVariables layered on top of it.
Can a Mermaid theme travel with the diagram?+
Yes — that is what a frontmatter config block is for. It sits at the top of the diagram code, so GitHub, docs sites, and mermaid.live all render the same styling without any site-level configuration. Layout, padding, and export resolution stay in the renderer, which is what the export tool above handles.
Why did my Mermaid diagrams change colour after an update?+
Mermaid 12 changed the default look of flowchart, sequence, class, ER, state, and requirement diagrams (and the newer beta types such as swimlane and venn) to the redux-color theme with the neo look, so a diagram with no theme set renders with a different palette and shapes on any site that has upgraded. To get the previous appearance back, add a frontmatter block with theme: default and look: classic. Every other diagram type still defaults to default and classic.
Which Mermaid theme should I use for PowerPoint slides?+
A light style such as Clean Docs with the transparent background on light decks, so the diagram sits on the slide with no white box. On dark decks, use GitHub Dark — black default text disappears on dark slides. Export at 4x (or SVG) so labels stay sharp on projectors. The PowerPoint guide walks through the whole workflow.
Which theme looks best in Word or Google Docs?+
Clean Docs on the white background. Document pages are white, so the exported PNG reads like a native figure instead of a pasted screenshot — the same logic as the Word and Google Docs insert guides.