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
%%{init: {"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
%%{init: {"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
%%{init: {"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.
Styling Mermaid yourself
Every preset here is a set of Mermaid themeVariables. If you would rather keep the styling in your own file, put an init directive on the first line — it travels with the diagram, so GitHub and your docs site render it the same way.
%%{init: {"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 an init directive falls short
It cannot change layout, 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 from the built-in Theme dropdown: default, neutral, dark, forest, or base. 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, the built-in dark theme does the same job with a different palette.
How do I customize Mermaid theme variables?+
Add an init directive as the first line of the diagram: %%{init: {"theme": "base", "themeVariables": { ... }}}%% with the variables you want — primaryColor, primaryBorderColor, lineColor, and fontFamily do most of the work. 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?+
Five built-ins: default, neutral, dark, forest, and base. base is the intended starting point for custom palettes — every additional style you see 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 the init directive is for. It lives on the first line 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.
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.