H·All Concepts
19
H

HEX

Color's digital address.

1 min read·Community

A HEX colour code is a six-digit hexadecimal value that specifies a colour by its red, green, and blue components — the lingua franca of digital colour communication, understood by browsers, design tools, and developers everywhere.

The Thought

A HEX code like #87ADFF decodes simply: the first two digits (87) are the red channel, the next two (AD) are green, and the last two (FF) are blue. Each channel is expressed in base-16 (0–F), giving 256 possible values per channel and over 16 million combinations in total. The uppercase or lowercase distinction is cosmetic — #87adff and #87ADFF are identical.

The three-digit shorthand (#FFF for white, #000 for black, #F00 for red) works when each pair of digits is a repeated character. This is a useful compressed notation but leads to common mistakes when designers expect #FFF to equal #FFFFFF1 (with opacity) — the fourth "digit" in four-character shorthand adds an alpha channel, not a brightness modifier.

HEX is being supplemented in modern web development by HSL (Hue, Saturation, Lightness) notation, which is more human-readable: hsl(220, 100%, 76%) is immediately more interpretable than #87ADFF. Design tokens increasingly favour HSL or OKLCH for their intuitiveness. But HEX remains dominant in design tools and in everyday design-engineering handoff, and fluency in reading and writing it is a practical baseline skill.

Key Principles
  1. 01

    Know your anchor colours by HEX — #FFFFFF, #000000, and your brand primary should be memorised.

  2. 02

    Shorthand HEX (#FFF) only works for colours where each channel pair is identical.

  3. 03

    HEX does not encode opacity — use RGBA or HEXA (8-digit) for transparent colours.

  4. 04

    OKLCH is the more perceptually uniform future; HEX is the practical present.

  5. 05

    A colour token with a meaningful name is always preferable to a raw HEX value in code.

Related