The Six Characters That Built the Web: A History of Hex Color
A Shorthand for Light: Every color on a modern screen is a mixture of red,
green, and blue light โ the additive primaries that LCD and OLED panels mix at the pixel level.
Each channel carries 256 possible intensities (0โ255 in decimal), which maps cleanly to two
hexadecimal digits (00โFF). The notation #RRGGBB packs all three channels into
six characters, making it easy to type, copy, and embed in HTML without needing a separate
table. The entire visible palette of 16,777,216 colors fits in a format shorter than most
passwords โ a remarkable compression of human vision into text.
From Mosaic to W3C: The hex format was popularized in 1994 by the NCSA
Mosaic browser, which borrowed the convention from the X Window System's color naming
infrastructure. Early HTML pages used it informally in attributes like bgcolor="#000080". By 1996, HTML 3.2 formally standardized the notation, and it
became permanent web infrastructure. Thirty years later, every browser still parses the same
six-character strings โ a rare case of computing backwards-compatibility surviving hardware
generations, display technologies, and complete browser rewrites.
Why RGB, HSL, HSB, and RGBA All Matter: RGB is hardware-native โ monitors literally mix those three light beams. But designers think differently. HSL (Hue, Saturation, Lightness) aligns with human colour intuition: rotate the hue and you change the colour family; adjust the lightness and you move through the tonal scale without hunting for new numbers. HSB (Hue, Saturation, Brightness) is the format Photoshop and Illustrator use โ same hue axis, but brightness replaces lightness, making it more intuitive for painters who think in terms of how much light a surface reflects. RGBA adds the alpha channel for transparency โ critical for overlays, glassmorphism, and shadows that solid hex codes cannot express. Modern design systems routinely use all four formats in the same file, each for a different purpose.
Harmonies, Contrast, and Design Systems: The three color harmony models
(complementary, triadic, analogous) come from 19th-century colour theory โ specifically
Johannes Itten's 1961 codification of Goethe's earlier wheel. The WCAG contrast ratio
standard, meanwhile, comes from the W3C's Web Content Accessibility Guidelines, which require
a minimum 4.5:1 ratio for readable body text and 3:1 for large headings. The 3-digit hex
shorthand #RGB (where each digit doubles, so #F0C becomes #FF00CC) was introduced in CSS Level 1 and remains fully supported โ a small but
useful compression when building design tokens and palette files.