Hexadecimal Code and the Physics of Color
|
red - ff0000 |
Blue - 0000ff |
|
Green - 00ff00 |
Black - 000000 (font color - ffffff) |
|
Now purple - ff00ff |
orange-y? - ff9900 |
The table above demonstrates how the physics of color-mixing is contained within the hexadecimal code used by computers to render colors on the monitor.
There are six places in the hex color code. The first two represent the intensity of red, the middle two hold place for green, and the last two digits represent blue in the "mixture".
Notice that "F" represents the highest value of each place, "0" represents the complete absence of that color. Therefore black--the absence of all color--is 000000. FFFFFF is the presence of all color, white.
F is the highest number since hex uses base-16, and we use the characters A, B, C, D, E, and F to represent the extra digits. "FF" is therefore a stonger intensity than "A4", which in turn is stronger than "37".
In the table below, I will experiment with different combinations of just red and green, leaving blue at 00. Notice that "Yellow" is high intensity of red and green!
ffff00 |
a1a100 |
ff6600 |
aaff00 |
a06000 |
608f00 |
Here are a few more cells, this time mixing in blue:
00ffff |
ff6633 |
aa66aa |
a1a1a1 |
60a0b0 |
You can see how changing the values in each place in the code number changes the color displayed. In the HTML source for this page, note that the hex number is preceded by a # sign, and the entire thing is surrounded by "quotes".
This paragraph has the normal background colour.
So does this paragraph, apart from this bit which is aqua.
Now we're back to normal.
Visit HTML Goodies for a long list of non-dithering hex color codes.