Hexadecimal color notation — the six-digit code like #1a73e8 — is one of the few pieces of 1990s web syntax that never got replaced. This tool converts that shorthand into the RGB triplet browsers, image editors and design tools actually compute with underneath.
Why colors on the web are written in base 16
When Tim Berners-Lee and later the HTML working groups needed a compact way to specify color inside markup, they borrowed a convention already used in early computer graphics: pack each of the red, green and blue channels — values from 0 to 255 — into two hexadecimal digits, since 255 fits exactly into FF. HTML 3.2, ratified by the W3C in 1997, formally allowed hex color attributes, and CSS1 (1996) carried the same notation forward. The appeal was density: a full 24-bit color fits in six characters instead of the eleven or more needed to spell out rgb(26, 115, 232).
What actually happens during the conversion
Each pair of hex digits is parsed as a base-16 number between 0 and 255: the first pair is red, the second green, the third blue. #1a73e8 becomes red=26, green=115, blue=232. Where a shorthand three-digit form is used (#fff), each digit is duplicated — f becomes ff — a rule defined explicitly in the CSS Color specification. If an eight-digit hex is supplied, the last pair is parsed as an alpha (transparency) channel.
Where this conversion matters in practice
- Working across design and code — designers in Figma or Sketch typically copy hex values, while some rendering engines, canvas APIs and older graphics libraries expect RGB integers.
- Debugging color math — blending, darkening or generating gradients programmatically is far easier once a color is three separate 0–255 numbers instead of a packed string.
- Cross-referencing print specs — print vendors and brand guideline PDFs frequently list RGB values for on-screen use alongside CMYK for print, without giving hex at all.
Frequently asked questions
Does hex support transparency? Only in its 8-digit form (#RRGGBBAA), a later addition standardized in CSS Color Module Level 4 and supported in all modern browsers since around 2017.
Is hex case-sensitive? No — #1A73E8 and #1a73e8 are identical; lowercase is simply the more common convention in modern codebases.
Why does my converted RGB not exactly match Photoshop's readout? It should match exactly for standard sRGB hex values; a mismatch usually means Photoshop's document is set to a different color profile (like Adobe RGB) rather than sRGB.
Further reading
MDN — <hex-color> — The formal three, four, six and eight digit hex color syntax.
W3C — CSS Color Module Level 4 — The current specification governing every color notation browsers accept.