When we think about design, color is something that comes up very naturally. Choosing the right colors can be challenging. Of course, they need to look aesthetic and cohesive. But there is another important factor to take into account: contrast.

Contrast is part of a broader family in design: accessibility. For a design to be clearly readable by as many people as possible, colors that appear next to each other need to have enough contrast. Even for people without any visual disability, good contrast simply makes things more comfortable to read.


Let’s start with black, the most common color for text. On a screen, the strongest possible contrast is black on white, with a contrast ratio of 21:1 (according to WCAG accessibility guidelines). But human vision is not just about “black vs. white”. What matters a lot is luminance: how bright a color appears to the eye.

And that's the interesting part. The human eye does not perceive all wavelengths with the same intensity. In daylight vision, our sensitivity peaks around yellow-green, roughly around 555 nm (visible light is approximately in the 400-800nm range). This does not mean yellow is magically the most readable color, but it's a first answer to why yellow could be a great choice when needing something to feel very bright and easy to notice.

This is also useful when thinking about color blindness. Most color-blind people have some form of red-green color vision deficiency, which can make reds, greens, oranges and browns harder to distinguish. Yellow is often still perceived as bright and noticeable, although it is not a universal solution (eg. tritanopia, where blue/yellow is the actual defficiency). The only thing to remember from this is quite straight-forward actually: never rely on color alone. Contrast is of course one way of dealing with this issue. But you can also use labels, icons, shapes, position and clear hierarchy.

Finally, yellow/black also works well under glare, from a distance, in peripheral vision, or when you do not have much time to process what you are seeing. This explains why yellow and black are often used for warning signs, hazard markings, construction zones, caution tape, industrial labels, etc. This color combination is even included in safety standards (ISO 3864) for hazard marking.


But why not make all important signs yellow? Why would a stop sign be red?

The answer is, once again, quite simple: signs aren't designed only for maximum contrast. They are designed for meaning.

Red is strongly associated with stopping, danger, prohibition and urgency. It may not always give the best luminance contrast, especially compared with black on yellow or black on white, but you recognize it and understand it instantly.

So the point is not that yellow/black is “better” than red. They are doing different jobs.
And this is precisely what good design is. Choices you make are the results of many reasons and constraints. It's always about making things in the right way, for the right reason, in the right context.