Why the code uses letters as well as numbers
A hexadecimal color code is written in base 16, rather than the base-10 system people usually use. After 9, it counts with A through F: A means 10, and F means 15. That lets two characters represent values from 0 to 255. In a screen-color code, each two-character group is one red, green, or blue channel, so software can read the code as three compact numeric settings.
For example, a channel value of 80 in hexadecimal is 128 in decimal. The conversion follows place value: the first character counts groups of 16, and the second counts individual units. Thus 80 means eight groups of 16 and zero extra units.
From numbers to light
When a browser or graphics program encounters a code such as `#RRGGBB`, it separates the three pairs and sends their values to the display system. The screen produces the corresponding amounts of red, green, and blue light at a pixel. Because the light is emitted—not reflected from colored paint—combining stronger amounts generally makes the result brighter, and equal settings produce gray shades.
Each channel has 256 possible settings. Together, the three channels allow 256 × 256 × 256 combinations, or 16,777,216 numeric recipes. That is why a six-character code can describe a large palette while remaining easy for software to store and transmit.
A recipe, not a guarantee of identical appearance
The code specifies channel values, but the visible result also depends on the display. Different screens can render the same requested values somewhat differently because their hardware and settings vary. The code is therefore a precise instruction within a color system—not a promise that every device will show exactly the same shade.






