htmlcolorsmnemonics

Intuitive way of understanding hexadecimal html color codes?


Is there an intuitive way, or a good mnemonic, for understanding the correspondence between colors and their hexadecimal values?


Solution

  • You just have to remember that the scale is 00 (no color effect) through FF (full color effect) and the three parts of the triplet are red, green and blue.

    000000 is black (i.e., no color) and FFFFFF is white (mixing all three primary colors).

    The hard bit is remembering the mixtures, which I use the following mnemonics for:

    Obviously, you may have to come up with your own mnemonics if you food tastes differ from mine. But I find that's the easiest way for me.

    Then it's just a matter of varying the quantities to add a little more red or little less blue and so on. I generally only use values of 00, 40, 80, C0 and FF since that gives you a 125-color palette to choose from and I don't want an abundance of choices to slow me down.