Research · Eye comfort

Code for hours,
without wrecking your eyes

A practical, sourced guide to how light, color, distance and time affect your eyes at the screen — and how the Coders {cookies} theme suite is tuned around it.

01 What "eye strain" actually is

The clinical name is Digital Eye Strain (or Computer Vision Syndrome). It is not damage — it is fatigue.

When you stare at a screen your eyes do three tiring things at once: they hold focus at one fixed distance for a long time, they keep converging (both eyes angled inward), and your blink rate drops by roughly half, so the surface of the eye dries out. Add glare and high contrast and the tiny focusing muscle (the ciliary muscle) never gets to relax. [1]

~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 comfortable reading (WCAG AA)

Common symptoms: tired or burning eyes, blurry vision late in the day, headaches around the temples, and trouble re-focusing on far objects. Good news — all of it is preventable with habits and a calmer screen.

02 Screen time & the 20-20-20 rule

The single most-recommended habit, endorsed by the American Academy of Ophthalmology and the American Optometric Association. [2]

The 20·20·20 rule

Every 20 minutes, look at something at least 20 feet (6 m) away for 20 seconds. That relaxes the focusing muscle and lets you blink fully and re-wet your eyes.

20 min
work interval
20 ft
look this far away
20 sec
hold the gaze

03 Distance, height & posture

Where the monitor sits matters as much as what's on it.

Distance

Keep the screen about 50–70 cm (20–28 in) away — roughly an arm's length. Closer forces more convergence and focusing effort. For bigger monitors, sit a little further back.

Height & angle

The top of the screen at or just below eye level, tilted back 10–20°. You should look slightly down — it keeps more of the eye covered by the lid, reducing dryness.

04 Font size & readability

If you lean in to read code, the font is too small — fix the font, not your spine.

Context Comfortable size Notes
Editor (VS Code) 14–16 px Bump to 16–18 px on 1080p or if you sit further back.
Body text on web 16–18 px Never below 16 px for long-form reading.
Line height 1.5–1.6× More vertical air = less re-tracking effort.
Line length ~80 cols Very long lines make the eye jump and lose place.
Use a real monospace coding font. Faces like JetBrains Mono, Fira Code or Cascadia Code have tall x-heights and clearly distinguished 0 O o l 1 I — less squinting at ambiguous glyphs.

05 Brightness, contrast & warmth

The two biggest comfort dials are how bright the screen is versus the room, and how blue its white point is. [3]

Match brightness to the room

Your screen should not look like a torch in a dark room, nor washed out in a bright one. Matching it to ambient light stops your pupils constantly re-adjusting.

Environment Ambient light Screen brightness
Night / dim room Desk lamp only ~100–120 cd/m²
Normal office Overhead lights ~150–200 cd/m²
Bright room / window Strong daylight ~200–250 cd/m²

Warm the white point at night

A cold, blue-tinted white (≈6500 K) is the most fatiguing and the most disruptive to sleep. Shifting toward warmer ≈3400–5000 K in the evening (Night Light / Night Shift / f.lux) is gentler on the eyes and your circadian rhythm.

06 Color, wavelength & the retina

Which colors actually feel "relaxing", and why.

Light is energy, and shorter wavelengths carry more of it. Blue light (≈415–455 nm) is the high-energy end of the visible spectrum; it scatters more inside the eye and is the hardest for the lens to focus crisply, which contributes to that fuzzy, tired feeling after a long session. Green (≈520–560 nm) sits in the middle of the spectrum — the wavelength the human eye focuses with the least effort and perceives as brightest, which is why green reads as calm and balanced. Warm amber / yellow tones carry little blue, so they're easy and restful, especially at night. [1]

Calming for the eye

  • Green — peak eye sensitivity, lowest focus effort.
  • Soft amber / warm yellow — low blue, restful at night.
  • Muted, desaturated versions of any hue.

Tiring for the eye

  • Pure saturated blue / violet on dark — scatters, blurs.
  • Neon, fully-saturated accents — harsh, glary.
  • Pure white text on pure black — maximum contrast shock.
Saturation is the hidden culprit. Highly saturated colors are bright, vibrate against dark backgrounds, and often fail contrast rules. Desaturating accents by 15–30% keeps syntax readable while taking the "sting" out. [4]

07 Pure black, halation & OLED

The most common dark-theme mistake — and why "true black" isn't always best.

Accessibility research is clear: avoid pure #000000 backgrounds with pure #FFFFFF text. The extreme contrast causes a halation effect — light text appears to bleed and glow into the black, which is especially hard for people with astigmatism and makes long reading uncomfortable. The fix is a soft dark gray background and an off-white foreground, while still hitting the WCAG 4.5:1 contrast minimum. [4]

The OLED nuance

On OLED screens a pure-black pixel is literally switched off, which saves power and gives infinite contrast — but that's exactly what maximizes halation and makes bright glyphs bloom. The sweet spot for OLED is a very dark, near-black gray (around 5% lightness): you keep almost all the battery and inky look, but soften the bloom and smooth out near-black gradients.

#000000avoid · halation
#0A0C0BOLED sweet spot
#191D1Bsoft dark gray
#FFFFFFavoid · glare
#C6D2C9soft foreground

08 Screen types compared

Each panel has its own comfort trade-offs.

Panel Strength Watch out for Best theme fit
IPS LCD Consistent color, no true-black bloom "Black" is backlit gray; can flicker (PWM) when dimmed Soft / Eye Comfort dark
OLED / AMOLED Per-pixel black, low power on dark UI Halation on pure black; possible PWM dimming flicker Eye Comfort OLED
VA Deep contrast, cheap Smearing; very deep blacks crush detail Soft / Eye Comfort dark
E-ink Reflective, paper-like, no backlight Slow, grayscale Light / Warm Sepia equivalent
Flicker (PWM) matters too. Many panels dim by flashing the backlight. If a screen gives you headaches at low brightness, look for a flicker-free / DC-dimming display and keep brightness matched to the room instead of cranked down.

09 Glasses, lenses & prescriptions

A short, honest take — see an optometrist for anything persistent.

Anti-reflective (AR) coating

The biggest, least-controversial win. AR coatings cut reflections off the lens so less stray light hits your eye — clearer text, less glare. Worth it on any computer glasses.

Blue-light filter lenses

May improve evening comfort and sleep for some people, though the clinical evidence for reducing strain is mixed. Software warm-shift (Night Light) does much of the same for free.

Computer / intermediate glasses

If you're over ~40 or wear progressives, a dedicated "intermediate" prescription tuned to 50–70 cm keeps the screen sharp without tilting your head back to find the right lens zone.

Keep your prescription current

An out-of-date or uncorrected prescription (even mild astigmatism) forces constant micro-refocusing and is a top hidden cause of "screen" headaches. Get an annual check.

10 Which VS Code theme is "better"?

There's no single winner — it depends on your room, panel and time of day. But the principles are consistent.

Recommended color combinations

Use case Background Foreground Accent bias
All-day dark #191D1B #C6D2C9 Desaturated green
OLED laptop #0A0C0B #C4CFC7 Soft green + amber
Late night #1E1810 #E6DCC8 Warm amber (low blue)
Bright room #F2F7F2 #22312A Deep green

11 The Coders {cookies} comfort suite

Seven variants, each tuned to one of the principles above. Pick by room and panel.

Coders Cookies Soft
// lighter matte const ship = () => "cookies"

Soft (Matte Green). A lifted, less-deep forest for people who find the deep variant too dark. IPS · day

Coders Cookies Eye Comfort
// soft & low-blue const ship = () => "cookies"

Eye Comfort. Soft gray bg, off-white text, desaturated + warm-biased syntax. all-day pick

Coders Cookies Eye Comfort OLED
// near-black, no halation const ship = () => "cookies"

Eye Comfort OLED. Near-black (not #000) — saves battery, softens bloom. OLED · night

Coders Cookies Warm Sepia
// very low blue const ship = () => "cookies"

Warm Sepia. Amber, minimal blue light — the late-night, wind-down theme. night · relax

Also in the suite: Coders Cookies (signature matte green), Coders Cookies Deep (deepest matte), and Coders Cookies Light (bright rooms). Install: ext install coderscookies.coders-cookies-theme