I'm trying to make my app a good Windows citizen, so I use matching system colors (see "When selecting system colors, match but don't mix") as much as possible. However, sometimes light text on a dark background (something like COLOR_APPWORKSPACE/clAppWorkSpace) seems most appropriate, but the system doesn't provide this. Do you have any recommendations regarding this?
You could swap two colors. For example, if you can read InfoText colored text on a InfoBackground colored background, you should be able to read InfoBackground colored text on an Info colored background (or apply the concept to Window and WindowText).
Readability might suffer slightly.
Edit:
Sometimes it is okay to use your own colors, as long as they aren't mixed in with system colors (i.e. don't draw your color text on a system color background). If your own color scheme seems appropriate, then use it. Besides, Windows doesn't have a configurable color for every single need.
My solution for now: I set the background color to COLOR_APPWORKSPACE/clAppWorkSpace because I assume it has the "dark background" semantic I want. To get a contrasting text color I just get the HLS representation of the same color and increase its lightness factor.
Related
Following up on a question asked here regarding contrast ratio requirements for WCAG AA, I'm trying to figure out the best solution for a conflict between WCAG guidelines and the corporate identity guidelines of the product I'm designing for.
Throughout the product's UI, the brand's primary color is mostly applied for buttons. The combination of light text with the brand's primary color results with insufficient contrast ratio. For achieving sufficient contrast, I tried darkening the button label text color or the background color of the button (see attached screenshot). However, changing the color of the brand won't be an acceptable solution for various reasons.
Apart from using dark text for button labels, how else could I achieve sufficient contrast ratio without modifying the brand's primary color?
You can't achieve sufficient contrast for AA level without changing the background color, or using a darker text.
In order to find the good matching color, you have to convert your color to HSL color space instead of RGB. Then conserving the Hue and Saturation you can change the luminosity and test the color.
This way you can find a color like #0F7FAD which will match your initial color, just being a little darker.
I empathize with you, I've struggled many times with trying to meet A11Y guidelines and design language / brand guidelines at the same time. It's not a battle that's easily or quickly won, but I applaud you for working to make the web more inclusive!
An option that has pushed the conversation further for my team in the past was to allow the end-user to choose the version of the site that they need or wish to use.
Do they want high-contrast styling?
Build an option in to replace the stylesheets - and apply the brand colors in different methods.
Other questions that may fit in to the topic area:
Do your users want enlarged or generously spaced text sizes?
What about enlarged UI elements?
How about a colorblind set of stylesheets?
TLDR: UI's are most often not one size fits all, so think about tailoring accessibility offerings in an a-la-carte manner. Let the consumer choose what they need!
Hope this helps, let me know how it's going!
I'm new to GhostScript. Can you let me know the Ghostscript command for finding the number of colors used for each page in pdf file. I need to parse the results of this command from java program
There is no such Ghostscript command or device. It would also be difficult to figure out; so much depends on what you mean. Do you intend to count the colour of each pixel in every image for example ? Which colour spaces are you interested in ? What about ICCBased colour spaces, do you want the component values, or the CIE values ?
[edit]
Yeah there's no Ghostscript equivalent, I did say that.
You wuold have to intercept every call to the colour operators, examine the components being supplied and see if they were no black and white. For example, if you set a CMYK colour with C=M=Y=0 and K!=0 then its still black and white. Similar arguments apply for RGB, CIE and ICC colour spaces.
Now I bet ImageMagick doesn't do that, I suspect it simply uses Ghostscript to render a bitmap (probably RGB) and then counts the number of pixels of each colour in the output. Image manipulation tools pretty much all have to have a way to do that counting already, so its a low cost for them.
Its also wrong.
It doesn't tell you anything about the original colour. If you render a colour object to a colour space that is different to the one it was specified in, then the rendering engine has to convert it from the colour space it was in, to the expected one. This often leads to colour shifts, especially when converting from RGB to CMYK but any conversion will potentially have this problem.
So if this is what ImageMagick is doing, its inaccurate at best. It is possible to write PostScript to do this accurately, with some effort, but exactly what counts as 'colour' and 'black and white' is still a problem. You haven't said why you want to know if an input file is 'black and white' (you also haven't said if gray counts as black and white, its not the same thing)
I'm guessing you intend to either charge more for colour printing, or need to divert colour input to a different printer. In which case you do need to know if the PDF uses (eg) R=G=B=1 for black, because that often will not result in C=M=Y=0 K=1 when rendered to the printer. Not only that, but the exact colour produced may not even be the same from one printer to another (colour conversion is device-dependent), so just because Ghostscript produced pure black doesn't mean that another printer would.
This is not a simple subject.
I'm creating a website and as I am thoroughly enjoying using SASS/Compass for organizing my CSS, I came to the idea of making my website themable.
At first, I was thinking to simply have a set of say 8 variables that represent the colors of a theme palette. Next, all CSS rules will use those colors, or lightened/darkened versions of it (for shadows, overlays, gradients and glows).
Then I came to the crazy idea of having a single theme base color, after which the rest of the palette is calculated from that. For example:
In this tool, I picked a single base color (the green at the inside of the circle), after which it generated a full color palette based on that (see right), in this case it is an "analogic" color scheme.
My question is if the alghoritm in use by this tool can be replicated in SASS, so that I can have a single configurable color, whilst SASS calculates the rest of the color scheme.
I know some of you may doubt the usefulness of this exercise, but I think of it as a fun experiment.
For one thing, that color wheel is incorrect. The complementary color of red is cyan, not green. Also, The correct term is 'analogous', not 'analogic'. I personally think this website is better.
To create a basic analogous color scheme, the first thing you need to have is a method to convert colors to and from HSL (or similar hue-based) form. Assuming you have this, the basic algorithm for the analogous 3-color scheme is:
Inputs: BaseColor, HueVariation
Color1 = BaseColor
Color2 = ColorFromHSL(Hue(BaseColor) + HueVariation, Saturation(BaseColor), Lightness(BaseColor))
Color3 = ColorFromHSL(Hue(BaseColor) - HueVariation, Saturation(BaseColor), Lightness(BaseColor))
Wikipedia has more information.
What you are looking for is a color harmony. There are lots of predefined schemes that can help you generate such harmonies. Usually, they are based on the HSL color space rather than the RGB color space.
Here's a link you can use:
http://www.tigercolor.com/color-lab/color-theory/color-harmonies.htm
http://sputnik.freewisdom.org/lib/colors/
You might also wanna try to search in google for other schemes.
Most of the time, a scheme will work with whatever given input color, so you may be able to create a custom scheme for one color and apply it for another set of colors.
Given that I have a texture file generated from a font bitmap builder like this:
Now I load it into my program. Then, I want to write my text with different colors rather than black such as blue, pink, ... from that original texture file.
What trick or algorithm should I use?
Any one can help me, please
Thank you very much.
If you have access to a white version with transparency, you can use hardware vertex blending to get any color you want, but as I said, the text has to be white. Doing it in a software loop is possible, but only with brute-force.. Even if you use a library, it will only be scanning every pixel in, converting it, and re-writing it again... Which is slow. So use hardware vertex coloring.
I have an text outline tree where i display a lot of information There are already upto three icons for each item (one in front, one after the text and one at the left side). But i still need to show more.
So i used different text colors. Unfortunately only the red=stop,forbidden,protected and green=okay,valid,allowed is so universal known. I mix it with black/blue which stands for none available information items.
My question is: Do red/green blind people recognize the difference of this colored texts?
I don't really care about real color blind people as they are in the 0,001% range while red/green blindness is serious high in the one digit percent range.
EDIT:
I heared from someone that he is red/green blind and is able to tell me if this is a green text or a red text and only if this is a real mixed color salad they are not able to differenciate between it. So the question is: are text items in a GUI list/tree so far away from each other that red/green blinded people can see them as different shades in whatever color they see.
NO, we do NOT see the difference!
I worked at a company that used red/green for information regularly, and it was very confusing.
But, do as they do in traffic lights, and add a little blue to the green color.
FF0000 and FF00CC is easy to tell apart (for me, at least).
Also, its easier to tell larger text/things apart. Small pixels or pixel-thin lines are harder to see the color on.
Red/green alone is bad for this reason. My boss actually has red/green colorblindness, so he points out anytime we mess up and he can't distinguish something.
Consider an:
outline box (eg dashed)
Background color
text bold/not bold
Yet Another icon
A variation or overlay on an existing icon
A mouseover hint (title)
A mouseover is actually a generally useful thing - while an icon may be intuitive to you, it might not be to someone using your app for the first time.
I agree with the suggestion to make it black-and-white to try it out- though there's also a couple Firefox extensions that do this: https://addons.mozilla.org/en-US/firefox/search?q=colorblind&cat=all -- unfortunately, none seem to be updated for 3.5.
Colors may give cues, but they should not be the only way to find that information.
Personal
I have a red/green deficiency, here are some of my experiences. Keep in mind color vision is very individual even among normal-sighted people. Some of that may be true in general.
Telling colors apart is easier than identifying colors
closeby large areas are easier to tell apart
Trying to tell colors is strenuous, it's less of a cue, more of a task
(i.e. color coded UI exhausts rather than helps me)
I can tell RGB(255,255,0) from RGB(0,255,0) and ident when they are side-by-side,
and can tell you "which is greener". However, I can't play most puzzle games that
use these for color-coding pieces.
Mixed colors give the most problems.
An intern was once confused by my problem, because the desktop background - some paintshop landscape - was all pink. I didn't know.
Imagine a list control (like an windows explorer file list) where file names are black, red or green:
telling red apart from black is hard. I usually don't notice until someone tells me. Even on decent TFT's, from a slight angle they wash. I can identify correctly if someone tells me "some of these are red" and I look hard.
I once deleted 3 days of work because I failed to notice that the list of files on the left was red not black (this was a font with 2 pixel line width!).
having a single red or green item among black ones, it's hard to tell whether it's red or green.
People deal differently with defects, and though I've never found a color vision deficient person to be ashamed or hiding about it, we still don't like to have it rubbed in. Some people, incidentally, get very argumentative because they can't imagine I can tell apart X and Y easily, but not X and Z. My best way to quiet them is to ask them to explain the color "blue" without using any color names.
General thoughts
Well chosen colors make valuable cues, improving UI transparence immensely. Don't stop using them for good - just allow people who don't see them easily to still use your software.
Allow customization of colors, and provide color schemes to pick quickly. I really don't want to select 14 individual colors.
Using slightly-off colors often looks much more professional than the "primaries" (one or two channels at 255, the last at 0).
Color perception differes a lot. What looks good to you on your monitor might suck everywhere else.
First, there's color reproduction of the monitor - they have huge differences in linearity, balance and isotropy. Unless you use the same brand from the same batch, or use properly calibrated professional monitors, they make for the biggest difference.
Second, is your sensors. There's an about 40/60 distribution among people of red perceptors working at different wavelengths. There are many more subtle personal differences.
Third, it's your brain. A lot of color perception is learned and affected by cultural background. see e.g. here.
7% of American men have some form of Red-Green color blindness. The rate among women is much lower. Incidence rates in other countries vary, but part of that is due to the low rate of diagnosis.
So, for the sake of ADA-compliance and conformance with UI best practices, don't use red and green colors alone as an indicator.
Also, no one wants to use an application that looks like angry fruit salad.
Could you maybe use bold/not bold/<span style="color:silver">grayed out<span> instead? (Sorry couldn't make the text silver colored.)
I agree with a great deal of what you say.
Red and Green are a very recognizable combination in terms of meaning.
In terms of colour blindness, the shades of green and red differ greatly in how "bad" they are. If you want to make sure you have a usuable UI look at it in black and white. (I take a screenshot and give it 20 seconds in Photoshop.)
If you can use what you see, move on. Otherwise, address the problems.
Kindness,
Dan