A hex color is a way of writing an RGB (and optionally alpha) color value as hexadecimal digits, most commonly #RRGGBB — a # followed by six hex digits: two each for red, green, and blue, every pair ranging from 00 to ff (0–255 in decimal). It's the most common color notation in CSS and design tools, standardized as part of the W3C CSS Color specification.
Each channel pair is a base-16 number from 00 (no intensity) to ff (full intensity, 255 in decimal):
#ff0000 → red = 255, green = 0, blue = 0 (pure red)
#00ff00 → red = 0, green = 255, blue = 0 (pure green)
#1d1d1f → red = 29, green = 29, blue = 31 (near-black gray)
CSS also supports a 3-digit shorthand (#f00 expands to #ff0000 by duplicating each digit) and, since CSS Color Module Level 4, an 8-digit form with alpha (#ff0000ff = opaque red, #ff000080 ≈ 50% transparent red) alongside the equivalent 4-digit shorthand.
#abc is #aabbcc, not #ab0c00.color(), lab(), etc.).#ff000080 is still pure red, just half-transparent.#FF0000 = #ff0000), but mixed case in a codebase makes diffs noisier for no benefit — pick a convention and stick to it.#ff0000 is just three numbers with no defined appearance).