Color theory for terminal themes (a short guide for the impatient)
You do not need a design degree to make a terminal theme that is not painful to look at. You need maybe three principles.
Color theory for terminal themes (a short guide for the impatient)
You want to build a custom terminal theme. You open a CSS file. You start picking colors. Half an hour later you have something that looks vaguely like a 1990s GeoCities page and you are not sure why.
You do not need a design degree to fix this. You need maybe three principles. This post is a short, opinionated guide to terminal color theory for developers who want their themes to stop hurting their eyes.
Principle 1: Pick a single accent and let it do most of the work
The single most common mistake in terminal themes is "too many colors trying to be the main color." You see a screenshot of an established theme and you notice a hot pink, a bright cyan, a vivid yellow, all pulling for attention, and you assume the theme is "colorful." It is not. If you look more carefully, one of those colors is doing 80% of the work and the others are accents — they are reserved for very specific things and rarely appear in the same field of view.
When you build your own theme, pick one accent color first. This is the color that highlights, hovers, focused borders, selection, the cursor, active tabs, and the syntax-highlighting "main keyword" tone. Everything else should be muted relative to it.
Some accent colors that work well in terminal themes:
- Warm orange (
#ff6b2b) — friendly, energetic, classic terminal vibes - Electric cyan (
#67e8f9) — modern, technical, slight retro-futurist feel - Phosphor green (
#00ff88) — high-contrast, slight horror, very 1980s - Magenta (
#f472b6) — vaporwave, late-night, slightly unhinged in a good way
Principle 2: Background and foreground, then everything else
Once you have an accent, pick your background and foreground. These are the most important colors in the theme because they are the colors that dominate every screen. Get them wrong and nothing else will save you.
The classic safe pair is dark background, light foreground. For dark themes, the background should be near-black but not pure black — pure black is too high-contrast and creates eye strain. Try #0a0a0f or #08080c instead of #000000. The foreground should be near-white but not pure white — #e0e0e8 reads as "white" but is much easier on the eyes than #ffffff.
Test the contrast. If you cannot read your own theme at noon with the curtains open, the contrast is wrong. If your eyes hurt after twenty minutes at night, the contrast is too high.
Principle 3: ANSI colors should be in the same family
The 16 ANSI colors (red, green, yellow, blue, magenta, cyan, white, plus bright variants) are the colors your terminal will use for syntax highlighting and shell output. They are not the same colors as your accent and chrome — they have to coexist with your background and your foreground without clashing.
The trick is to make all 16 ANSI colors live in the same color family. Pick a single hue temperature (warm, cool, neutral) and pull all your ANSI colors from there. If your background is a cool blue-tinted dark, your reds should be warmer to compensate. If your background is a warm brown-tinted dark, your reds can be cooler.
A specific recipe that works for cool dark themes:
--t-black: #1a1a2e; /* slightly blue-tinted dark */
--t-red: #f87171; /* coral, not pure red */
--t-green: #4ade80; /* mint, not lime */
--t-yellow: #fbbf24; /* warm, not lemon */
--t-blue: #60a5fa; /* sky, not navy */
--t-magenta: #c084fc; /* lavender, not hot pink */
--t-cyan: #22d3ee; /* aqua, not turquoise */
--t-white: #e5e7eb; /* warm white */
All seven colors live in the same family — they are all slightly desaturated, slightly cool, with similar luminance values. They look like a coordinated palette, not a clown car.
What about light themes
Light themes are harder than dark themes for one specific reason: every color you pick has to read against a white background, which means every color needs to be darker and more saturated than its dark-theme equivalent. The same recipe that works for dark themes does not translate.
Some advice for light themes:
- Foreground should be near-black, not pure black —
#1a1a2eor#0f0f1f. Pure black against pure white is a contrast crime. - Accent should be saturated — pastels disappear on white. Use real colors.
- ANSI colors need higher saturation than their dark-theme equivalents — the white background washes them out.
Honestly, light themes are harder and most people do not use them anyway. Skip unless you specifically need one.
Effects: less than you think
MOLTamp has CRT, scanline, and glow effects. They are great for vibes and easy to overdo. Some rules:
- Glow at 0.4-0.6 looks atmospheric. Glow at 1.0 looks like the screen is on fire. Pick a glow color that matches your accent and turn it down.
- Scanlines are a binary — either they are part of the theme's identity (like in Phosphor) or they are noise. Do not add subtle scanlines as a "tasteful touch." Either commit or skip.
- CRT curve is fun for screenshots and exhausting for daily use. Try it for a day before committing.
The one thing nobody tells you
Pick your colors at the time of day you actually code. If you build your theme in the morning sunlight and then try to use it at midnight, it will be all wrong. The eye adapts to ambient light and a theme that looks "balanced" in daylight will look painfully bright at 1am. Test in your real working conditions.
I usually build themes at night and then run them through a "morning test" the next day to see what falls apart. Half the colors I pick at midnight need to be desaturated by 10% in the daylight version. Find your own ratio.
What this looks like in practice
The skins that ship with MOLTamp follow these rules. If you want to see the principles in action, look at:
- Obsidian — single warm accent, deep restrained background, ANSI colors all in the same warm family
- Phosphor — single accent (green), pure monochrome chrome, ANSI colors are all green variants
- Deep Space — single cool accent (cyan), true dark background, ANSI in the cool family
The bad themes you have seen on the internet violate one or more of these rules. The good ones do not.
Now go build a theme. The skinning guide has the variable reference, and Building your first MOLTamp skin walks you through the structure. Three principles, thirty minutes, a theme that does not hurt to look at.