Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

Is there a single text color that, when used on either dark or light background, produces a readable (or at least tolerable) output?

If it makes it easier, constraints can be put on the hue, saturation or brightness of the backgrounds and/or the text color, as necessary.


Motivation: Although there may be other uses of this, my motivation is from a user's point of view. I prefer to use dark themes both on my OS and my browser, but many applications and websites set only either the background or the text color, while at the same time doesn't bother with setting the other one. The default theme in my OS and browser is dark text on light backround and that's what most applications expect. I would like to select a color that is acceptable when an application is not respecting my themes.

share|improve this question
    
"I would like to select a color that is acceptable when an application is not respecting my themes." So are you actually asking for a text colour that will work for any arbitrary background colour, as this is not under your control? –  e100 Dec 17 '12 at 10:52
    
@e100 ah you must mean the 'constraints can be put' part. I added that because I can imagine sg. like let's say '#770 is better than #777 on everything but light green' (not tested:)). –  naxa Dec 17 '12 at 11:17
    
I have to say I don't think this is a real problem - at least for websites. How many sites really set background but not foreground colour? And surely a properly written user stylesheet will always override a website thus you can set both text and background. –  e100 Dec 17 '12 at 11:27
    
@e100 how many websites - more than I (or you) would expect. For example (it's vice versa, but) msdn.microsoft.com/en-us/library/… and Gmail has only recently fixed it. So I would say major IT companies don't bother. Once you try it you will notice that there are many, many sites like this. –  naxa Dec 17 '12 at 11:32
    
@e100 userstyles - I could use them but I really do not want to always override. I want a different default. Also this is just a motivation. My question was for a suitable color. Anyone messing around with light-on-dark themes/defaults (os,web,etc.) knows this is a problem more common you would think. :) –  naxa Dec 17 '12 at 11:34

2 Answers 2

up vote 2 down vote accepted

Try something around #777 grey. That should give you tolerable contrast on black or white.

share|improve this answer
    
Found a nice tool for experimenting: Colour Contrast Check snook.ca/technical/colour_contrast/colour.html - also shows if you are compliant with w3.org/TR/2008/REC-WCAG20-20081211 (makes a great reference) –  naxa Jan 8 '13 at 23:40

Does it have to look good? or just "work"?

If by working you mean sufficient contrast, then any middle tone should do. No?

As to looking good, I suspect that your problem statement is too ill-posed to ever find the one magic color that works well in all cases.

share|improve this answer
    
Both; I'm happy with a working solution but would be definitely interested to find a method for finding a good-looking combination. Maybe for the latter I should ask then: given a light color A and a dark color B, how to find a color C that looks good on both A and B. –  naxa Dec 15 '12 at 22:50
1  
Well then the naive answer is (A+B)/2. Human visual acuity is poor at low and high brightness, ergo anything in the middle "works" to create a lot of contrast, but "good" is still too ill-posed. –  DrFriedParts Dec 15 '12 at 22:57
    
I see! thanks for the information. What would be a better question instead of 'good', with this intent? –  naxa Dec 15 '12 at 23:01
1  
This answer would be better as a comment on the original question. –  e100 Dec 17 '12 at 10:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.