DEV Community

Anita Olsen
Anita Olsen Subscriber

Posted on

Why Code in Dark Mode?

Dark mode was originally the default colour scheme for computers and many people believe that coding in dark mode reduces eye strain (among other things) but there is no conclusive evidence for it.

I code in light mode and prefer it to dark mode simply because it feels better on my eyes. Light mode also makes my coding activity feel lighter and therefore also more pleasant as well.

Which mode do you code in and why?

Top comments (50)

Collapse
 
bhuvaneshm_dev profile image
BHUVANESH M

@anitaolsen Because light attracts bugs! 🐛💡

Collapse
 
touficmamdouh profile image
touficmamdouh

blue dark mod 😂

Collapse
 
anitaolsen profile image
Anita Olsen

Awesome 😄

Collapse
 
john_thrush_d56f061bc03eb profile image
HeavyMetalCoffee

For me, everything is set to dark mode. I suffer from chronic and ocular migraines. When I switch something to dark mode, my eyes literally feel relief. It also seems to keep colors from blending.

Collapse
 
moopet profile image
Ben Sinclair

themes > modes

I use darker backgrounds for writing code and lighter backgrounds for reading documentation.

Collapse
 
anitaolsen profile image
Anita Olsen

Aha, interesting. Thanks for sharing!

Collapse
 
thenickest profile image
TheNickest

For a while using dark mode everywhere I can but not in my newspapers apps and some code documentation. This post also made me think to just try out light mode again here and there.. love to have a switch though.

Collapse
 
fmerian profile image
flo merian

@tomayac published an in-depth, resourceful post on the topic back in 2019.

tl,dr on why people like or want dark mode

  • aesthetic reasons
  • accessibility
  • power savings

full disclosure: i'm definitely on the dark side :)

Collapse
 
georgekobaidze profile image
Giorgi Kobaidze

Used to be a light mode guy. But my eyes never liked bright lights in general, so I decided to give the dark mode a try. Was a bit strange at first, but once I got used to it, never ever looked back.

Collapse
 
besworks profile image
Besworks

Syntax highlighting stands out way better against a dark background. That's the main reason. But also I don't just code in dark mode, my whole setup is like a black hole. Goes perfectly with the ThinkPad style. Light mode anything on this makes my eyes feel like they wanna bleed 😎.

dark fury theme

Collapse
 
anitaolsen profile image
Anita Olsen

Wow, that looks cool with all the red!

Collapse
 
besworks profile image
Besworks

The icons are from a handy pack that I found a while ago. They start as white but you can change them to any color with the included script.

Thread Thread
 
anitaolsen profile image
Anita Olsen

Ah, cool! Thanks for sharing!

Collapse
 
pengeszikra profile image
Peter Vivo

Much more less light need for that. On light mode the whole screen is luminating more intensive. I agree @besworks syntax highlight working much fine on dark compare the light or midtone setup.
I start developing a right markdown view specialized the codeblock syntax highlighting even with strange use cases for example a JSDoc where great to make color difference between a casual remmark and types, but that is also true for TS because if IDE give a different colors for types that is a great help for quick code reading.
I also like to use a different bracket colors for a different level.

Collapse
 
alexmario74 profile image
Mario Santini • Edited

Dark mode. Just can't stay in front of a white background.

About the code looking "pleasant" I think that this is the color scheme, not just dark or light. Also the font play a huge role. If you use or not ligatures.

I think that solarized fit good, for the font I'm not so sure which I prefer. Don't like Fira Code too much.

Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more