Programming with white text on black background? [closed] - editor

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 months ago.
Improve this question
Does anyone program with white text against black background? I have heard some rumors that it is better for your eyes. What's the case? Is it any better than the traditional black on white? What are the pros and cons?

It's actually white on black, or rather green or amber on black, that is the traditional way. I've used them all. :)
I believe that the use of black on white started in word processors, because it's a lot easier on your eyes when you alternate between looking at the screen and looking at source material printed on paper.
Also, the contrast between the screen background and the surrounding lighting should be small, so a white background works best with the well lit room most people use computers in most of the time. If you are programming in the darkness a black background would give less contrast, but then it's more a question of why you don't have proper lighting in your room...
There are of course personal preferences than can affect your choise of color setting, and your eyesight (or lack thereof) might also make one setting better than the other.

There is an endless debate on slashdot one can go through for all the unintelligible technical details (the more technical analyses seems to favour dark on light side though).
This article, though about web designing, warns about the hazards of mindless black theming. The important aspect I understand is that the font is more important than coloring schemes. There is also disadvantage for black (not dark in general, but just pure black) background with white font if font is thin, since black creeps on to white and font would look a lil' blurry.
Despite all that, personally I find reading on darker background much easier for eyes. I don't think there is a definite answer for "light font on darker background" or vice versa. It will have to depend on personal tastes and habits more importantly. For sure, the right scheme lets the font (the writing) to project to fore and subdues the background. Now ask yourself is it dark on light that does this or light on dark? Here is the key, in that advocates who vouch for similarity with print suggesting that black outshines the white on paper, is blind to the fact that it is not the situation when it comes to electronic screen. Here the intensity of white beams on your eyes is much higher when compared to black.
And there is nothing like a best background color or fore color, but its the combination that matters. Right combination gives the right contrast, and contrast matters. And contrast should be sufficiently high, but not enough to be straining. Pure white on deep black can be hurting (the contrast being significantly high) but at the same time white on dark green is soothing. The same goes with amber on black.
Also when having a dark background it should be pale and not intense, so something like dark grey or teal will be better than black which in turn will be better than blue, red etc. Black on grey is excellent.
The solarized theme actually is after some good round of testing, going after their website. The good thing I love about Notepad++ is that some of the better known themes like solarized, zenburn, vibrant ink are available built in with the style configurator. Obsidian is the best without a doubt btw! :) Catch it for Visual Studio here.

It seems to be a preference thing and possible environmental thing, honestly. You'll find people who believe each method is superior.
I know that personally, I have coded since the green-on-black and amber-on-black terminals were around, and now I use light gray text on black backgrounds wherever possible. I find black backgrounds to be extremely comfortable on my eyes even for very long sessions, but white backgrounds are very fatiguing. I have heard it described as "staring into a 100 watt lightbulb" and that's how it feels to me.
Room lighting can potentially have a significant effect also. Brighter rooms may lend themselves to brighter backgrounds, and darker rooms to dark backgrounds. It reduces the need for your eyes to struggle to switch between wide and narrow pupils required for bright then dark then bright as you occasionally look away from the monitor to relax your eyes (you should always do this, right?).
The best advice is to just try both, give it a week or so, and decide which you like better. If you find both the extremes are glaring, try using a more subdued theme than pure whites and pure blacks, try some softer grays.

The quick answer is "dark text on white background suits more people".
My answer refers to this one: https://graphicdesign.stackexchange.com/questions/15142/which-is-easier-on-the-eyes-dark-on-light-or-light-on-dark
As a person with astigmatism, I find white background with dark text is easier to read as the reference suggested. (I specifically experienced this after using the dark theme in visual studio 2013. It is so fuzzy to me that I had to change back to its 2012 default theme.)
Below are the quotes:
The science of readability is by no means new, and some of the best research comes from advertising works in the early 80s. This information is still relevant today.
First up is this quote from a paper titled “Improving the legibility of visual display units through contrast reversal”. In present time we think of contrast reversal meaning black-on-white, but remember this paper is from 1980 when VDUs (monitors) where green-on-black. This paper formed part of the research that drove the push for this to change to the screen formats we use today.
However, most studies have shown that dark characters on a light background are superior to light characters on a dark background (when the refresh rate is fairly high). For example, Bauer and Cavonius (1980) found that participants were 26% more accurate in reading text when they read it with dark characters on a light background.
Reference: Bauer, D., & Cavonius, C., R. (1980). Improving the
legibility of visual display units through contrast reversal. In E.
Grandjean, E. Vigliani (Eds.), Ergonomic Aspects of Visual Display
Terminals (pp. 137-142). London: Taylor & Francis Ok, 26% improvement
– but why?
People with astigmatism (aproximately 50% of the population) find it
harder to read white text on black than black text on white. Part of
this has to do with light levels: with a bright display (white
background) the iris closes a bit more, decreasing the effect of the
"deformed" lens; with a dark display (black background) the iris opens
to receive more light and the deformation of the lens creates a much
fuzzier focus at the eye.
Jason Harrison – Post Doctoral Fellow, Imager Lab Manager – Sensory
Perception and Interaction Research Group, University of British
Columbia The "fuzzing” effect that Jason refers to is known as
halation.
It might feel strange pushing your primary design goals based on the vision impaired, but when 50% of the population of have this “impairment” it’s actually closer to being the norm than an impairment.
The web is rife with research on the topic, but I think these two quotes provide a succinct justification for why light text on a dark background is a bad idea.

I'm sure that plus of programming and using white on black layouts causes less energy using.
Example of site saving energy by black layout is http://blackle.com/

well if you are programming when it is already dark outside then yes that rumor might be true becuase it is better for your eyes if the contrast between your monitor and room is smaller.

Below mixed with my own thoughts and others.
Pure Black:
Pure white text on pure black is awful for reading (it's looks awesome on some graphs). Contrast is too high, and pure black may looks unnatural. So Visual Studio is using dark grey, just like Photoshop.
Visual Studio Team Says:
According to The Visual Studio Blog, dark editor themes are overall more preferred, reduced strain over long time usage is the top reason.
Emotional Expectation:
Emotionally, at least for some I guess: things related to creation with a dark theme may feels better, like those software; things books alike, e.g. blog or something, light background may better, since it's more expected.
Black for Colors:
For eyes, generally, I'm fine for both light and dark theme, since I'll always make sure the backlit not too light. As for Visual Studio, I guess the strain for eyes comes from the scanning of colors. You know, it's already hard to recognize all those colors (okay not that hard, you got the point), then there's that big fat white on the way, all the way. Guess eyes just have a "color sensitive mode", like people may not enjoy two white bars even if it's a light colored cartoon.
Light background easily makes things look clean, leads to higher readability for articles; dark background helps emphasize the color, leads to higher readability for codes.
One difference between blog and code text is that, codes are generally colored in a way it can standout its construction. Read an article will focused more on its meaning behind the words, but reading codes focus more on its visual construction and color, focus more on words itself. In photo editing and movie playing, dark colors provides less distraction. We treat codes actually more like a photo or video where visual matters more or even lots. Dark background fades away and makes the visual construction stand out.

I use black background, because it wont strain my eyes. I used to regularly use white background, After 2 years, my eyes started getting strain. i tried to reduce the screen brightness, but it didn't help.
Finally i switched to black and now my eyes hardly even get stressed or watery (but still i'm going to wear spects soon)...

I know this is an old question, but I figured I'd give a little bit of my input. Maybe it'll help someone.
Purely white background was starting to hurt my eyes from several hours of nonstop programming. My vision was getting blurry to the point where I would have to stop. I attempted to use darker themes, but it was harder to focus on text and that made it more difficult for me to scan through the code to find a particular bit. Search functionality would not always work, because I might not know what I'm looking for (solving an exception-less bug, etc).
I looked around and found out that some gamers and programmers use yellow-tinted glasses. Popular choice appears to be Gunnars. However, I didn't feel like spending $70 on a pair of glasses, because historically, my comfort zone with glasses is very narrow and I didn't feel like wasting my time or money.
So, further searching around brought me to f.lux. It's absolutely free. The default settings were a bit too extreme for me and I couldn't get used to them even after two weeks. However, after adjusting them slightly, I've been enjoying it very much. During the day time, the screen is at its normal tone and intensity, but as the evening closes, it transitions into dimmer settings. When I tried to test the difference (after getting used to it) by disabling it, it made it painful to look at the normal screen. So, it does work. If you decide to give it a try... just try to use it for a few weeks before dismissing it. It took me a while to get used to it.
Anyways, if you just can't stand darker themes, like me, those two options are probably a good way to remedy that issue.

I have heard that black text on white background will not hurt your eyes, but using a black background for a long time, can make visual problems of your eyes.

B.K. brings up a lot of points that I too experience. First of which I know this is an older post, but it's still a relevant question. Secondly where I differ is I use a hybrid of darker and traditional lighter themes.
Personally I find darker background to be visually better. When I code I use this type of theme in my IDE Dark Theme for Visual Studio 2010 With Productivity Power Tools. The one thing that I do differently is I do not use the very dark code area or alter the coloring of the text. I go in and change my Options > Environment > Fonts and Colors > Plain Text > Item Background > Custom > Silver. This in turn gives me the aesthetically pleasing darker menus and such in the IDE but still makes my eyes focus on the code. It also keeps all the text and color coding that is native to the default IDE. This of course is for Visual Studio 2010. Newer versions or different IDEs have their own themes.
I have very light sensitive eyes and I tend to get headaches when coding all day without breaks. So I prefer toning the menus, tool bars, and side bars of an IDE to be darker. I also do use the Gunnar glasses.
There's quite a bit of evidence supporting that white background with darker text is actually better for your eyes in well lit office situations and such. https://ux.stackexchange.com/questions/53264/dark-or-white-color-theme-is-better-for-the-eyes Has some very good sources listed throughout the responses on these studies. This is mainly concerning design for end users, but at the end of the day even though we are developers we are still end users of the IDE products and the same rules still apply.
So in conclusion it has a lot to do with your environment, your eyesight, and what you prefer. I personally use a dark IDE with a gray or silver work space with traditionally dark text. This makes it still easy to spot the contrast, but doesn't hurt my eyes by overwhelming me with white.

On my laptop dark background create too much light reflection.

It is really cool for your eyes.
White means full colour -- rgb(255, 255, 255) -- and black means no colour -- rgb(0, 0, 0). So when you are reading some black text against white background, the screen is flashing a lot of light except for a small portion (the text). On the other hand, when you are reading a white text against black background, the screen emits (almost) nothing except for the text area. That's why it looks so cool.
However, the contrast and environment lighting matter. Although I prefer white on black, both pure white on pure black and pure black on pure white have a high contrast, making things unreadable. In my personal experience, 'dark white' text on 'light black' would be the most suitable and long-readable theme for any environment.

I used to program with
White background, I felt more tired and kind of flickering when going home and more tired.
Then I switched to Black background
Eye feels more relaxed and much less tiring and stressed.
I am not sure, which is good for eyes though.
Technically.
When the background is Black the iris open more. I think it allows more radiation in. Not sure.

I'm using white background, because as a web developer you moving from browser to editor all the time and most websites are in white.
I tried to use black background and my eyes started to hurt, because of the switching between both editor and browser. (editor - black, browser - white)
I guess if you work just in black background for all your apps this might work

Related

Unity 2D: after-image from OLED screens in a high contrast situation

When I test my unity 2D game on my iPhone X, all background and sprite elements on the screen have a blue "halo" when moving my character. I have explored the issue with transparency on mobile, but the issue seems really strange. The blue halo appears only when the background is black. Anything brighter and it is absolutely fine. So I doubt it's a transparency issue given that it appears only when a dark background is present.
It is visible only on mobile, so taking a screenshot is useless.
If anyone wants to test do the following. Download or open the image attached here to full screen. Zoom in just a bit so the shapes are taking most of the screen. Start moving the image left and right. Slow and fast and you should see a blueish after-image around the edges. This should happen only on some OLED mobile screens.
If anyone ever encounters this. The result I mentioned is an after-image effect from the OLED screen on the iPhone X. I haven't tested on other OLED devices, but I assume depending on the software it is possible other models can experience this. The levels of Black are incredible, but when you have a high contrast situation between light and dark, an after-image is created around the edges of the contrast zone.
How to fix this?
Simply do not use full black backgrounds or elements. Near black colors in a game situation is indistinguishable from a true black, 0, 0, 0 RGB, choice. This might be a common game design principle I am unaware of and I am the only person stupid enough to use 0,0,0 in the first place, but anyway, I hope if someone has the same issue to read this and fix it easily,

Fake colors through camera

in an iOS application I need to recognize colors through camera, but analyzing the problem, I noticed that different kinds of light make the colors observed in the captured picture a little bit different from the real ones. For example, under a high neon light a light blue seems like a gray.
What is the cause and what kind of approch I could follow to solve this problem of "fake colors"?
The colors are not fake, they are just different than what you expect them to be. As #Piglet said this has a lot to do with the physics of light and white balance may help.
If you want to read more about it look at:
Color Rendering Index
Color Metamerism
Sensitivity Metamerism Index
Color Constancy
These all refer to the physics behind why different illuminations create different colors. There is also the camera color pipeline that contributes its share, so you can also read about white balance and tone mapping...

I have hand-drawn some work on grid paper and scanned it, how can I use Photoshop to remove the gridlines

The grid is a blue/green. The work is in a black ink, and has a fair bit of variety of pressures, which I want to retain.
Here's a link to a small selection.
I have Photoshop v3
My attempts have involved using Select, Color Range, and sampling some grid, then inverting.
Is there a better way?
I also have some experience with Python and PIL, if that's a useful alternative.
This is a Photoshop answer, rather than a programming answer, but that seems to match your question's needs.
I applied a Black and White filter, and enabled a Blue filter, then set the Blue channel sensitivity to 300%, like this in Photoshop CC.
and got pretty good results like this:
In an older vsersion of Photoshop, you may need to go to Image->Mode->Lab Color and then go into the Channels palette and deselect Lab leaving just a and b channels selected, then use Select->Color Range to get the blues (or maybe the blacks!!!!) before going back to RGB mode.

Creating "performance" output bars in iOS - Photoshop/programming interplay

My partner and I are trying to figure out how best to create scaling, colored performance bars for one of our mobile exam-prep apps. The goal is to create a horizontal bar that graphically represents a scale of 0 - 100% using Photoshop or something similar. We had hired a professional graphics designer but we're left holding the bag trying to figure out how to make the graphics actually "fill the bar" in the actual app.
(I can't post pictures yet, but you can see a link to the picture here):
http://www.productionplanningpro.com/wp-content/uploads/2012/06/Screen-Shot-2012-06-25-at-9.47.24-PM.png
As the bar would reach certain percentages, it would change color from Red to Green appropriately. I'm trying to figure out how to give this to my contractor without handing him 100 files, each showing 1% more of the bar (and even then, I'm not a graphics artist, so this whole thing is above my head). I've done as much research as I can stand, and I've seen the fancy iOS graphing APIs - we're just looking to fill in these two bars.
Any insight or help is SUPER appreciated!! Thanks!
Jotuned
There are quite a few solutions to this problem. I'm sure there's a way to fill in the area with that shadow programmatically, and I'm also sure someone will come along with a masking solution sooner or later.
The quickest and easiest way, though, is to have your artist simply create that red filler bar one time, and have it fill the entire space (ie. drawn at 100%). Then you make sure that, in the graphic that is the 'outside' of the bar, the space where the red bar should be is an alpha channel.
When you actually get to coding it, place the red bar at the very bottom of all the objects you're drawing to the screen. The rest of your UI should entirely hide it. Then as progress moves from 0% to 100%, you move the bar slowly to the right, filling in the space (and showing through the alpha hole in the 'bar holder'.
Quick, simple, have done this many times before. Masking would work as well, but seems a bit overkill in your situation (and I don't have any experience with it on iOS, so I can't offer any assistance there!) Let me know if you have any questions while trying to implement this :)

Is a glossy or matte LCD screen better for long coding sessions? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm looking at getting a new LCD monitor, but I'm concerned that a glossy monitor might cause more eye strain after a long day of work. I typically spend a lot of time in front of my monitor, so eye strain is definitely something I have thought about. Do you prefer the matte or glossy LCD screens and why?
Matte, because you get fewer reflections on it, which is good if your workplace is bright. I've worked with both, but especially if you have bright objects around your monitor, or windows at the side, you'll really want to have a matte one.
Constantly having reflections in it is really annoying, and hurts the readability in the long run.
I have a glossy screen on my laptop and I have an LCD standalone monitor that I hook up. I like them both for different reasons.
Reasons I like my glossy monitor:
Graphics look great
Colors look vivid
Presentations look awesome
Graphics are really easy on the eye and just seem to flow like on TV
Great for games which all look phenominal
It's widescreen, great for movies
I can see all my code without having to scroll right [because of the widescreen]
Reasons I like my Standalone Matte Monitor:
My code is easier to read [Consequently this is what I use for programming]
Graphics I design on my glossy screen don't always look great on my matte monitor, but graphics I design on my matte screen always look fantastic on both.
It's bigger (may not be relevant to you)
It has a higher contrast ratio and better backlight
If you're somewhere bright or have a light source behind you, i.e. you're sitting with your back to the sun, the glare can be intollerable on both screens... whichever has the highest "Bright" setting will win out here.
What I find a lot of people say about "You should use matte because..." or "You should use glossy because..." are just repeating what the guy in FutureShop or CompUSA spewed out trying to sell them what they ultimately bought.
I have one of each, I love having one of each and love them both for different reasons. Pick the one that's best at whatever you're going to be using it for.
My suggestion is this: Find somewhere you can try them both out side by side for what you're going to be using it for, or if you can, try each of them out for a few days to decide.
I prefer glossy, as long as the light isn't shining on it. Check where your computer is, and where your lights are and where your windows/skylights are. Otherwise, I would always use matte.
I think this is pretty much a personal choice. I used to think that glossy is unbearable until I got a laptop with a glossy screen and was forced to work with it for some time. Now I don't even care too much and don't feel that it's much worse. If I had a choice, I'd still choose a matte one, however.
I went through the same dilemma when I bought my current laptop. I'm an old timer and I didn't want the glossy screen. I almost bought a different one because I wanted the matte screen. I would go into Circuit City and Best Buy and I would hate the glare. I then used one at a friends house for a few hours in more real world conditions and I liked it. I bought a glossy one but I was still torn about my decision.
Now I'm glad I got the glossy and I wouldn't buy a laptop without one. Not only does most things look better on it, but it has a great viewing angle. I tend to use my laptop a lot when demoing stuff or working with a user. You can't beat the viewing angle of the glossy displays.
After two years of using it I rarely run into situations where I run into glare from bright lights. The few times I do, just a slight repositioning is all that is required to fix it.
When I replace my current monitors they will be glossy. The issues with a laptop, because it's mobile, just don't really exist with a desktop monitor. Neither of my two desktop environments present a glare issue. I currently have one glossy and one matte at work and I don't really see a difference between one and the other as far as eye strain. For me it's all viewing angle and how great stuff looks on the glossy one.
I think glossy gets too much stick. The reflections can be a nuisance in the wrong environment, but matte screens don't give the pure, unmolested picture that some people seem to think - incoming light gets diffused over the screen's surface by the anti-reflective coating hence the sharpness and contrast that the underlying panel is able to offer are degraded somewhat.

Resources