For developers · Eye biology

How color and youreyes actually work

Light is energy. Your lens, pupil and retina each react to it differently. This is the visual science behind a calm code theme — wavelength, focus, contrast and halation, drawn out step by step.

How light reaches your retina
SCREENRETINACORNEALENSblue focuses short

01 Three things tire your eyes at once

The clinical name is Computer Vision Syndrome. It is fatigue, not damage. While you read code, three muscular and chemical processes run in parallel — and a harsh theme makes every one of them work harder.

Sustained focus

The ciliary muscle holds the lens at one fixed distance for hours and never fully relaxes.

Convergence

Both eyes stay angled inward on a near target, a constant low-level muscular load.

Reduced blinking

Blink rate drops by roughly half, so the tear film evaporates and the surface dries.

~50%
drop in blink rate while reading a screen
3+ hrs
daily screen time where symptoms commonly start
4.5:1
minimum text contrast for comfort (WCAG AA)

02Light's path to the retina

Every photon from your screen passes through the cornea and lens, which bend it to a point on the retina. The catch: the lens bends short (blue) wavelengths more than long (green/red) ones, a property called chromatic aberration. Pure blue tends to focus slightly in front of the retina, so it never lands perfectly sharp.

SCREENRETINACORNEALENSblue focuses short
SourceScreen pixels
RefractCornea + lens
AperturePupil
SensorRetina / fovea

The pupil widens on a dark UI, which lets in more light but slightly softens fine strokes — one reason dark themes pair well with a +1 px editor font.

03 The visible spectrum, by energy

Wavelength is energy. The short, blue end (~415–455 nm) carries the most energy, scatters the most inside the eye, and is hardest to focus. The eye is most sensitive around 555 nm (green), so green looks bright at lower luminance. Amber sits far from blue scatter, which is why it reads as restful at night.

Blue · 450nm
Green · 533nm
Amber · 590nm
← higher energy · more scatterlower energy · less scatter →
~450 nm · BLUE

Highest energy. Scatters and blurs — the main strain driver.

~533 nm · GREEN

Near peak sensitivity. Bright with the least focus effort.

~590 nm · AMBER

Long wavelength, near-zero blue scatter. Best after sunset.

04 Why green is the calmest color for code

Least focus effort

Green lands cleanly on the retina, so the lens barely has to correct for chromatic aberration.

Perceived brightest

Sitting near the 555 nm sensitivity peak, green reads bright without needing high, harsh saturation.

Low blue scatter

Our greens keep their blue channel under 141, far below blue-heavy themes that scatter on the retina.

Every Coders Cookies accent sits at 530–535 nm (or 590 nm amber for Warm Sepia) — deliberately inside the low-fatigue window of the spectrum.

05Pure black, halation & OLED

Pure #000000 behind pure #FFFFFF creates the maximum possible luminance jump. Light from the bright glyphs scatters in the eye and appears to bleed into the black — the halation effect. It is worst for people with astigmatism and on OLED, where each black pixel is fully off and the edge is razor-sharp.

Background#000000
Foreground#FFFFFF
EyeLight scatters
ResultGlow / bloom

The fix is a soft dark-gray background and an off-white foreground, while still clearing WCAG 4.5:1.

#000000
avoid · halation
#0A0C0B
OLED sweet spot · 4%
#191D1B
soft dark gray · 11%
#C6D2C9
off-white foreground

OLED nuance: a near-black gray around 4% lightness keeps almost all the pixel-off battery savings while softening the bloom — which is exactly what the Eye Comfort OLED variant uses.

06 The saturation rule

Saturation is the hidden culprit. Fully saturated colors vibrate against dark backgrounds, force the eye to refocus between hues, and often fail contrast. The comfortable band for sustained reading is roughly 40–70% saturation.

30% · too dim40–70% · comfort band70%+ · neon, glary

Coders Cookies accents land at 44–69% — Eye Comfort is the calmest at 44%, the most conservative pick for all-day use.

07 Our palette, mapped to the spectrum

Each variant's accent is placed deliberately on the wavelength curve. Lower blue channel and lower saturation mean less fatigue.

VariantAccent≈ nmSat.Blue ch.
Warm Sepia#E0B86C~59065%108
Standard Dark#3DBE6A~53351%106
Light#1E9E55~53068%85
Eye Comfort#74C98C~53544%140
Eye Comfort OLED#5EC987~53250%135
Deep Dark#36D873~53268%115
Soft Dark#49DD82~53269%130

This guide is for general education, not medical advice. For persistent eye discomfort or vision changes, see a qualified optometrist or ophthalmologist.