Simon Pfeiffer for Codesphere Inc.
Posted on
#discuss #productivity #darkmode #webdev
There are few debates as contentious in the development and UX world as color schemes. Among developers, however, there seems to be a pretty significant skew towards coding in a light on dark mode (This poll found that ⅔ of surveyed developers prefer to use a dark mode in their code editor).
Dark mode advocates cite a number of benefits, including reduced eye strain, better sleep, and reduced power consumption. While many of the arguments for dark mode undoubtedly have merit, there is far from a scientific consensus on many of its benefits.
A Little Bit ofHistory
While we might think of dark mode as a relatively new trend, it was actually the original color scheme that was used for computers. Most early computers used light text on dark background in order to save power. As computers became more consumer-friendly, however, developers began to use black text on white backgrounds to imitate the black ink on white paper that most people were used to.
More recently, countless devices, websites, and apps have added support for dark mode for both optical and aesthetic reasons. Software developers, who spend most of their work time staring at computer screens, have been some of the most fervent advocates for dark mode.
1. Eye Strain and Readability
The first argument for dark mode that's worth taking a look at the claim that dark mode is better for your eyes. While there is no doubt that using light mode in a dark room can be blinding, there also seems to be evidence that our brains are just better at reading and comprehending black text on a white screen.
For example, A 2013 study by Psychologist Dr. Cosima Piepenbrock looked at how adults with normal vision performed at visual acuity and proofreading text across dark and light color schemes. The study found that:
"Pupil sizes were smaller and proofreading performance was better with positive(Dark on Light) than with negative(Light on Dark) polarity displays"
In other words, for substantial digital tasks where you are attentively reading text(Such as coding), *having dark text on a light background (i.e. light mode) can help you focus and comprehend better. *
What this means in practice is that your eyes and brain may have to work harder to read and write code if your IDE is in dark mode.
2. Blue Light and Sleep
Another commonly cited claim is that using your IDE in dark mode reduces blue light consumption, and therefore can help you sleep. While dark mode definitely does reduce blue light, blue light may not be the primary culprit that actually messes up your sleep schedule.
A 2019 study by the University of Manchester found that blocking blue light only slightly improved people’s sleep patterns. Instead, the real culprit is the use of warmer colors(Like reds and yellows) at night, which trick our brain into thinking it's daytime.
If you want to get better sleep, dark mode may in fact help, but the real solution is to not use screens altogether before going to bed.
3. Power Consumption
Another argument for using dark mode in your IDE is that it can save you money on your power bill. If you are using an OLED display, which most modern monitors do, then this is definitely true.
It is probably important to note, however, that if you are developing software that is computationally heavy, like rendering 3D graphics or training and using machine learning models, the reduced power consumption from dark mode probably won’t make any sort of noticeable dent in your power bill.
4. Accessibility
Regardless of what you personally prefer while you code, you should always add support for both dark and light modes in the software that you build. Many people who have certain color blindness or eye conditions can find one of these themes extremely hard or even impossible to use. Giving your users flexibility is therefore very important.
Conclusion
In summation, the jury is still out on whether dark mode is actually better for coding. While it might save you a tiny amount of power and, if you are using it at night, marginally help your sleep schedule, these benefits don’t seem to be that substantial. In addition, reading dark text on a light background may help you read and write code more efficiently.
Your theme therefore should come down to what is best for you, because there is not a scientific consensus that one color scheme is going to be better than the other. If you think dark mode looks sleeker and you are doing a lot of coding at night or in the dark, then go ahead and use dark mode. If you prefer the readability of dark text on a light background, then go ahead and use light mode.
So what do you prefer and why? Personally, I think dark mode is more aesthetically pleasing but I definitely notice how it can be harder to read.
Let us know in the comments what you think!
Top comments (54)
Subscribe
Matt Cobley
Matt Cobley
Senior Software Developer with a background in server infrastructure. I've also got an interest in DevOps and all things open-source
-
Location
Bath, UK
-
Work
Tech Lead at MoneyHub
-
Joined
• Jun 9 '21
- Copy link
I think there was also some research that said that if your are in a light environment then having your background match this is less straining on your eyes, and vice versa. So during the day in a well lit room light mode is likely to be more comfortable, but at night or in a dark room then dark mode would likely feel better. There seems to be a misconception that dark mode is generally better to prevent eye stain, and that's clearly not true.
Rafael Heard
Rafael Heard
-
Joined
• Jun 10 '21
- Copy link
I like this comment because I code in various locations. If I'm outside and it's sunny I frequently switch to a light theme. If I'm in my office where it's a bit more dim I'll apply a dark theme.
Simon Pfeiffer
Simon Pfeiffer
Product Manager @ Codesphere Inc
-
Location
Bonn, Germany
-
Work
Product Manager at Codesphere
-
Joined
• Jun 10 '21
- Copy link
Ah okay, thats a valid point! I definitely find myself adjusting my color scheme according to the time of day. Thanks for pointing that out!
Matt Cobley
Matt Cobley
Senior Software Developer with a background in server infrastructure. I've also got an interest in DevOps and all things open-source
-
Location
Bath, UK
-
Work
Tech Lead at MoneyHub
-
Joined
• Jun 10 '21
- Copy link
No problem. Apologies I've not got any specific references - the info is out there though.
Another interesting point is that if you have astigmatism then it can be more difficult to comprehend the white text on dark background due to the colours bleeding together (or something similar to that). It's certainly not one size fits all.
Thor Galle
Thor Galle
I'm a full-stack web dev 🍰 Currently the only engineer ("CTO") of a small Belgian company making slow travel more accessible! 🌳
-
Location
Helsinki
-
Education
Computer Science & Design
-
Pronouns
he/him
-
Work
🏕️ welcometomygarden.org & 🎫 slowtravelpass.com
-
Joined
• Jun 10 '21
- Copy link
I've been doing this switching based on the light in my environment too, it's indeed what gives me the most comfort.
I got a system-wide shortcut set up using a macOS Automation and this LifeHacker guide, so with one key press the whole system and all apps change from light to dark, or vice versa. Then DarkReader does the same for the web browser :)
A good thing that dark mode support became mainstream!
Mohamed Ashiq Sultan
Mohamed Ashiq Sultan
Full Stack Developer | Tech Enthusiast | Knowledge Seeker
-
Location
India, Chennai
-
Education
MSc
-
Work
Full Stack Developer
-
Joined
• Jun 15 '21
- Copy link
I see, I always use dark mode, thought just adjusting brightness should be enough.
Dimitri Simonishvili
Dimitri Simonishvili
-
Location
Tbilisi, Georgia
-
Education
International Black Sea University - Msc
-
Work
Back-end developer at Kings Lithuania
-
Joined
• Jun 25 '21
- Copy link
True, while I code in daytime, I've bright colors palette in my IDE. If I've to code at evening when there is no much light, I prefer dark theme.
Tim Fish
Tim Fish
-
Joined
• Jun 10 '21
- Copy link
Most modern monitors are not OLED yet simply because of the cost of producing panels that large. For example, Apple do not sell an OLED MacBook yet. OLED is becoming pretty common for high end phones.
Most modern monitors do use LED backlights and where these support dynamic contrast they will use less power in dark mode.
Javan Pohl
Javan Pohl
"Make it fast, easy-to-use, and pretty"
-
Location
Denver, co
-
Work
Junior Full-stack Developer
-
Joined
• Jun 11 '21
- Copy link
LED monitors will only offer energy saving benefits with dark mode if they have "local dimming" (which the ability to turn off certain led nights in response to the image being displayed). And it doesn't appear that this is a very common, or well implemented, feature on PC monitors rtings.com/monitor/tests/picture-q....
Another thing to note with OLED is that the technology is inherently susceptible to burn in. They are not a wise choice for monitors.
Coderslang: Become a Software Engineer
Coderslang: Become a Software Engineer
Teaching you to code at js.coderslang.com - JavaScript, HTML, CSS, Node.js, React.js, React Native
-
Email
welcome@coderslang.com
-
Work
Founder at Coderslang
-
Joined
• Jun 11 '21
- Copy link
100% agree. Wanted to say the same, but then used search :)
Pontakorn Paesaeng
Pontakorn Paesaeng
I am a frontend developer focused in creating application with React, Vue and Svelte. Currently, I am a software engineering student at Kasetsart University.
-
Location
Thailand
-
Education
Undergraduate
-
Joined
• Jun 9 '21
- Copy link
I prefer dark mode because it is better to serparate code and non-code application.
Besides, good theme can help you.
For light mode, I prefer some not to bright such as Solarized Light theme or any theme without white background. White background is too bright for coding.
Richard Ikin
Richard Ikin
Software Developer since 1982
-
Email
richikin@gmail.com
-
Location
UK
-
Work
Indie Game Dev, former professional Embedded C Dev. at Red7Projects.
-
Joined
• Jun 9 '21
- Copy link
I find Sepia is a good alternative to white themes.
Simon Pfeiffer
Simon Pfeiffer
Product Manager @ Codesphere Inc
-
Location
Bonn, Germany
-
Work
Product Manager at Codesphere
-
Joined
• Jun 10 '21
- Copy link
agreed! Which is why I love that Codesphere's light mode is predominantely grey toned.
Pontakorn Paesaeng
Pontakorn Paesaeng
I am a frontend developer focused in creating application with React, Vue and Svelte. Currently, I am a software engineering student at Kasetsart University.
-
Location
Thailand
-
Education
Undergraduate
-
Joined
• Jun 17 '21
- Copy link
It turns out that Quiet Light is a bit better for me. I try using something live Solarized light or gruvbox. VSCode looks "incorrect" with those themes. It likes my screen display wrong color.
Quiet Light for light theme and Nord for dark theme.
anabella
anabella
Full-stack developer, recovering ex-QA
-
Location
Barcelona
-
Work
Software Engineer at Typeform
-
Joined
• Jun 10 '21
- Copy link
Somebody had to advocate for us light-moders out there!
Mazen Touati
Mazen Touati
Ordering a pizzacode 🍕
-
Location
The Netherlands
-
Education
Media Engineering Master's degree
-
Work
Back-end developer
-
Joined
• Jun 11 '21 • Edited on Jun 11 • Edited
- Copy link
I prefer dimmed themes like Solarized Light which is Yellowish or Creamy (@hanpari already mentioned this)
Dark themes hurt my eyesight. It may be a medical condition or continuous fatigue. However, when I use a dark theme. I start to have double vision with texts. It becomes harder to read in a way that leads to a loss of focus.
On the other hand, light themes are too bright to handle. Thus, it leads us to an in-between choice. We get a subtle contrast and a reduced exposure to bright lights.
Charity Gamble
Charity Gamble
Front-End & WordPress Developer. Learning 11ty and other web tech along the way.
-
Location
Colorado Springs, CO
-
Education
University of Phoenix, Western Iowa Tech Community College
-
Work
Self-Employed
-
Joined
• Jun 10 '21
- Copy link
I prefer dark mode. I have some light-sensitivity issues with my eyes and reading dark on light seems to cause more discomfort than light in dark for me. It’s also better for me when I have a headache.
Adrian Matei
Adrian Matei
Making bookmarking easier for devs with www.codever.dev
-
Education
Software Engineer
-
Joined
• Jun 10 '21
- Copy link
Use flu.x and you don't have to worry about dark mode again...
Nic
Nic
I like problem solving and making things pretty. I also like red.
-
Location
England
-
Education
University of Warwick
-
Work
Front End Developer
-
Joined
• Jun 10 '21
- Copy link
I love flu.x. It's amazing how much I don't notice the colours change on my screen until I turn it off and it's suddenly so bright.
Ben Sinclair
Ben Sinclair
I've been a professional C, Perl, PHP and Python developer.I'm an ex-sysadmin from the late 20th century.These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
-
Location
Scotland
-
Education
Something something cybernetics
-
Pronouns
They/them
-
Work
Full-stack agency person
-
Joined
• Jun 10 '21
- Copy link
f.lux and its alternatives solve a different problem, and have their own drawbacks.
Brendan Mullins
Brendan Mullins
js shenanigans and such
-
Joined
• Jun 13 '21
- Copy link
I care more bout how good the contrasts are and how quickly I can differentiate different parts of the code, but after reading this I will try some light themes again, I have been using dark mode for years so I might be a bit biased
Jason C. McDonald
Jason C. McDonald
Author. Speaker. Time Lord. (Views are my own)
-
Email
codemouse92@outlook.com
-
Location
Time Vortex
-
Pronouns
he/him
-
Work
Author of "Dead Simple Python" (No Starch Press)
-
Joined
• Jun 9 '21
- Copy link
Dark mode is, in fact, sometimes very helpful for comprehension w/ dyslexia. (Speaking from experience.)
Simon Pfeiffer
Simon Pfeiffer
Product Manager @ Codesphere Inc
-
Location
Bonn, Germany
-
Work
Product Manager at Codesphere
-
Joined
• Jun 10 '21
- Copy link
wow, interesting. Would love to find out more behind the science of that.
Jason C. McDonald
Jason C. McDonald
Author. Speaker. Time Lord. (Views are my own)
-
Email
codemouse92@outlook.com
-
Location
Time Vortex
-
Pronouns
he/him
-
Work
Author of "Dead Simple Python" (No Starch Press)
-
Joined
• Jun 10 '21 • Edited on Jun 10 • Edited
- Copy link
I have as much trouble reading pure white-on-black as I do black-on-white. My own ability to handle that much contrast in connection w/ my dyslexia varies from day to day. I was on traditional black-on-white yesterday, today I need dark mode white-on-grey. Other people are more consistent in their dyslexia symptoms; my dyslexia just happens to be largely via a traumatic brain injury, so the symptoms fluctuate depending on other factors as well.
In any case, higher contrast is harder for many people w/ dyslexia to read. One of the best solutions is to change the background color to something other than white or black, and the ideal background varies from person to person, and situation to situation. ("Solarized" themes are often nice.) A lot of dark modes aren't just pure white-on-black anyway, whereas light mode is virtually always black-on-white. That's why I gravitate toward them.
I like Visual Studio Code, and Dark Reader in my web browser, for this reason! Both give me quite a bit of control over the colors. That's the important part ultimately. On LibreOffice, I'll typically change my document background (Tools > Options > Application Colors) to be light green, light yellow, or light blue.
Understand, though, "dyslexia" is something of a cover-all term. You'll be hard pressed to find two dyslexic individuals who experience it the same. Different severities and forms demand different techniques to mitigate; high contrast just happens to be one of the more common triggers.
I also saw in another comment something about matching your environment. I'd have to agree. I tolerate brighter themes better in daylight, and darker themes better at night. My eyes get quite tired if I get that backwards, which only exacerbates my dyslexia.
Liam Wang
Liam Wang
A Full-stack developer proficient in Laravel + Vue.
-
Location
Carrollton, TX
-
Joined
• Jun 10 '21
- Copy link
One of my colleagues said, "We love dark mode since bugs like the light." ~LOL~
For some reason, I love working during the night, just my habit, and I love dark theme in a dark room. It's a bit straining to look at a light screen during the night.
Domagoj Vidovic
Domagoj Vidovic
Frontend Engineer in a London tech-startup. Let's make our Frontend lives more magical ✨ JS/CSS/HTML enthusiast
-
Location
London, England, United Kingdom
-
Work
Frontend Engineer at Orbital Witness
-
Joined
• Jun 10 '21
- Copy link
I love light theme because of the better visibility of dark text on light background.
But hey, this is the article for starting a war 🔥
Yair Even Or
Yair Even Or
Javascript, CSS & HTML
-
Email
vsync.design@gmail.com
-
Location
Israel
-
Joined
• Jun 10 '21
- Copy link
You should do everything on dark mode because:
- it saves energy = green for the planet
- it heats the room less
For decades I've had dark wallpaper on windows for those two reasons, and I change whatever I can to dark more to save energy and have less stress on the eyes.
Matt Cobley
Matt Cobley
Senior Software Developer with a background in server infrastructure. I've also got an interest in DevOps and all things open-source
-
Location
Bath, UK
-
Work
Tech Lead at MoneyHub
-
Joined
• Jun 10 '21
- Copy link
This is only relevant if you have an OLED display and you use pure black, not just a dark colour like dark grey or dark blue, if I remember correctly.
Yair Even Or
Yair Even Or
Javascript, CSS & HTML
-
Email
vsync.design@gmail.com
-
Location
Israel
-
Joined
• Jun 10 '21
- Copy link
I had CRT back in the day :) for me flat screens are still a new thing.
UnLucky
UnLucky
-
Location
India
-
Work
Student
-
Joined
• Jun 11 '21
- Copy link
Idk but this is my review I used dark mode in mobile and laptop the whole time but when you suddenly go to dark room I was unable to see object like you know ig because the brain got used to it and it cannot make diff
Brian Dunne
Brian Dunne
-
Joined
• Jun 16 '21
- Copy link
It would be interesting to see the study in point 1 repeated with code that's syntax-highlighted. The contrast between colors is much easier for me to differentiate in dark mode, so I find myself having to look more closely at the code itself in light mode to puzzle out what's going on rather than being able to quickly scan through the code structure based on syntax highlighting.
Samuel Suther
Samuel Suther
Founder of JUST-SELL.online- Love coding and optimizing things.
-
Location
Germany
-
Work
Mobile-Developer at @my Desktop ;)
-
Joined
• Jun 18 '21 • Edited on Jun 18 • Edited
- Copy link
Best mode against eye strains is Off-Mode ^^ - but the downside is, productivity by coding also decrease to 0%
But thanks for this article, I'll think about to give it a try again to switch from now to then between dark and light... and will see on which times a day I'm comfortable with dark or light mode.
Currently I prefer Dark, because it mostly feels less stressing to me.
View full discussion (54 comments)
For further actions, you may consider blocking this person and/or reporting abuse