Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I realized belatedly that it's pretty easy to memorize by heart the RGB hex codes of the most common colors by deriving them from basic color theory. For example, what's the hex code for yellow? Well yellow is the complementary color of blue, and so hex(yellow) is just the ones' complement of hex(blue)=#0000FF, i.e, #FFFF00

Likewise, cyan is the complementary color of red, so hex(cyan) is the ones' complement of hex(red)=#FF0000, i.e. #00FFFF. This hex code also makes clear that cyan is produced by mixing equal amounts of green and blue light.

what about azure? azure is when you take cyan and and 'de-emphasize' its green component. So you just halve the green part of its hex code, to get #0080FF. If you instead halve the blue part, you get #00FF80 (spring green)

likewise, orange is when you take yellow (#FFFF00) and halve its green component, so: #FF8000.

And so on. Not every common color can be derived in this way, but you can go very far.



Realistically you do not want to use super-pure colors like this for everything. It's the visual equivalent of shouting everything at the top of your lungs. Pull back from those FFs and give yourself some room for nuance.


Alternatively, leave the FFs and increase the other channels to 80 and above to desaturate for a nice pastel look.


Holy crap. Thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: