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]
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.
- Take a longer 5–10 minute break every hour and stand up.
- Consciously blink — or use lubricating drops in dry / air-conditioned rooms.
- For coders, bind a 20-minute timer (Pomodoro, a system reminder, or a break-timer extension) so you don't rely on willpower.
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.
- Position the monitor perpendicular to windows to kill glare.
- Match a desk lamp's brightness to the screen; light the wall behind the monitor (bias lighting).
- Don't put a bright window or lamp directly behind or in front of the screen.
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. |
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.
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.
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 |
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.
- Dark theme in a dim room; light theme in a bright room. Match the screen to the surroundings.
- Background a soft dark gray, not pure black. Foreground off-white, not pure white.
- Desaturated, mid-tone syntax colors with green/amber bias read calmly for hours.
- Keep text contrast ≥ 4.5:1, UI elements ≥ 3:1.
- Avoid rainbow neon syntax, pure-black canvases and pure-white text.
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 |