Themes
Available themes and customization
Glow supports multiple built-in themes that control how your markdown is rendered in the terminal — from syntax highlighting colors to heading styles and list formatting. Choosing the right theme can dramatically improve readability depending on your terminal's color scheme and your personal preferences. This page walks you through the available themes, how to switch between them, and how to customize rendering to match your workflow. Whether you prefer a minimal look or a rich, colorful output, you have full control over how markdown appears in your terminal.
Before working with Glow themes, make sure you have the following in place:
- Glow installed on your system (see the Installation guide if you haven't set it up yet)
- A terminal emulator with 256-color or true color support — most modern terminals qualify (e.g., iTerm2, Alacritty, WezTerm, Windows Terminal, GNOME Terminal)
- Familiarity with basic Glow commands such as
glow <file>andglow --help - (Optional) A text editor for modifying Glow's configuration file if you want persistent theme settings
Themes are bundled with Glow itself — no separate installation is required. If you already have Glow installed, all built-in themes are immediately available.
If you haven't installed Glow yet, follow the steps below:
- macOS (Homebrew)
brew install glow
- Linux (Snap)
sudo snap install glow
- Linux (APT — Debian/Ubuntu)
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install glow
- Go (install from source)
go install github.com/charmbracelet/glow@latest
- Verify the installation
glow --version
Once Glow is installed, all theme functionality described on this page is available without any additional steps.
Glow's theme behavior is controlled through a combination of CLI flags and a persistent configuration file. Here's what you can configure:
--style flag
The primary way to select a theme. Pass a named theme or a path to a custom JSON style file.
| Value | Description |
|---|---|
dark | Optimized for dark terminal backgrounds (default) |
light | Optimized for light terminal backgrounds |
notty | Plain text output with no color or formatting — useful for piping or logging |
dracula | A popular dark theme with vivid purple and pink tones |
tokyo-night | A cool dark theme inspired by the Tokyo Night color palette |
/path/to/style.json | Path to a custom Glamour-compatible style definition |
Default: dark
Why it matters: Your terminal background color determines which theme is readable. Using dark on a white background (or vice versa) can make headings and code blocks nearly invisible.
--word-wrap flag
Controls the column width at which text wraps. Set this to match your terminal width or preferred reading width.
| Value | Effect |
|---|---|
0 | No wrapping (outputs full line length) |
| Any positive integer | Wraps text at that column width |
Default: 80
Configuration file
To avoid passing --style every time, you can set a default theme in Glow's configuration file. The config file lives at:
~/.config/glow/glow.yml
A minimal configuration looks like this:
style: "dark"
local: false
pager: true
width: 80
Set style to any of the named themes or an absolute path to a custom JSON file. Changes take effect the next time you run glow.
Applying a theme at render time
Use the --style flag to specify a theme when rendering any markdown file or URL:
glow --style dark README.md
glow --style light CHANGELOG.md
glow --style dracula notes.md
This applies only for the current invocation. Your configured default (in glow.yml) is unaffected.
Using a theme with a URL
You can apply themes when rendering remote markdown too:
glow --style tokyo-night https://raw.githubusercontent.com/charmbracelet/glow/main/README.md
Rendering without color (plain output)
When you want to pipe Glow's output into another tool, strip all formatting with the notty style:
glow --style notty README.md | grep "##"
This ensures downstream tools receive clean, undecorated text.
Using a custom style file
If you've created or downloaded a Glamour-compatible JSON style definition, point Glow directly at it:
glow --style ~/.config/glow/my-theme.json README.md
See the Examples section below for the structure of a custom style file.
Setting a permanent default theme
Edit ~/.config/glow/glow.yml and set the style key:
style: "light"
From this point on, every glow invocation uses that theme unless you override it with --style.
Interactive TUI mode
When you run glow without arguments or with a directory path, Glow opens an interactive file browser. The theme you have configured applies to previews rendered inside the TUI as well. Navigate with ↑/↓, open a file with Enter, and press q to quit.
Example 1 — Render with the built-in dark theme
The default experience for a dark terminal background:
glow --style dark README.md
Expected output: Your markdown renders with colored headings (bold and highlighted), fenced code blocks in a distinct background, blockquotes styled with a left border, and list bullets using Unicode characters. All colors are tuned for dark backgrounds.
Example 2 — Render with the light theme
Switch to light-background-friendly colors:
glow --style light README.md
Expected output: Similar structure to dark, but with darker text colors and lighter backgrounds on code blocks — readable on white or cream terminal themes.
Example 3 — Strip all formatting for piping
glow --style notty README.md | wc -l
Expected output: A plain line count with no ANSI escape codes, making it safe to compose with other UNIX tools.
Example 4 — Use a custom JSON theme
First, create a minimal Glamour-compatible style file:
cat > ~/.config/glow/my-theme.json << 'EOF'
{
"document": {
"color": "#cdd6f4",
"background_color": "#1e1e2e",
"margin": 2
},
"heading": {
"color": "#cba6f7",
"bold": true,
"prefix": "# "
},
"code_block": {
"color": "#a6e3a1",
"background_color": "#313244",
"margin": 1
}
}
EOF
Then render using that file:
glow --style ~/.config/glow/my-theme.json README.md
Expected output: Your document renders with the custom colors — a dark Catppuccin-inspired palette in this example — overriding all built-in defaults.
Example 5 — Set a default theme in config, then override per session
Set your default in ~/.config/glow/glow.yml:
style: "light"
Now override it for a single render without changing the config:
glow --style dracula NOTES.md
Expected output: NOTES.md renders with the Dracula theme. Your next invocation of glow (without --style) reverts to light.
Colors look wrong or washed out
Symptom: Headings and code blocks appear in unexpected colors or look nearly invisible.
Likely cause: You're using a theme designed for the opposite terminal background. dark on a white terminal or light on a black terminal will cause contrast issues.
Fix: Match the theme to your terminal background:
glow --style light README.md # for light/white terminals
glow --style dark README.md # for dark/black terminals
ANSI escape codes appear as raw text
Symptom: You see sequences like \e[1m or \033[32m in the output instead of styled text.
Likely cause: Your terminal does not support ANSI colors, or you are viewing Glow's output inside a tool that strips color support detection.
Fix: Use the notty style to disable all color output:
glow --style notty README.md
Alternatively, check that your TERM environment variable is set correctly (e.g., xterm-256color):
echo $TERM
export TERM=xterm-256color
Custom style file is not applied
Symptom: Glow renders with the default theme even though you passed a --style path.
Likely cause 1: The path is relative and Glow can't resolve it.
Fix: Use an absolute path:
glow --style /home/youruser/.config/glow/my-theme.json README.md
Likely cause 2: The JSON file contains a syntax error.
Fix: Validate your JSON before using it:
cat ~/.config/glow/my-theme.json | python3 -m json.tool
Fix any reported errors, then retry.
Config file changes have no effect
Symptom: You edited ~/.config/glow/glow.yml but Glow still uses the old theme.
Likely cause: The YAML syntax in the config file is invalid, so Glow falls back to defaults silently.
Fix: Check your YAML is correctly formatted. A valid minimal config looks like:
style: "dark"
width: 80
Indentation must use spaces, not tabs. You can also run Glow with an explicit --style flag to confirm the flag path works independently of the config file.
Theme looks fine in standard render but not in TUI mode
Symptom: glow --style dracula README.md looks correct, but the interactive browser (glow .) uses different styling.
Likely cause: The TUI reads from the persistent config file (glow.yml), not from your ad-hoc --style flag.
Fix: Set your preferred theme as the default in ~/.config/glow/glow.yml:
style: "dracula"