Skip to content
BENIBIX Learn

Hex Color Code

Also known as Hex Code, Hex Color, Hexadecimal Color

A # and six signs that name one exact screen color. #FF0000 is red.

Think of it like

It is like a short secret code for a paint color. Six signs name it exactly.

Example

Emma's brand guide lists the blue as #1E66F5. Every developer pastes that code and gets the same blue.

Why it matters

A hex code is exact. So a color stays the same from the design file to the live site.

Definition

A hex color code writes an RGB color as a # and six characters. The pairs stand for red, green and blue, each from 00 to FF. FF is the most of that color, and 00 is none. So #FF0000 is pure red and #FFFFFF is white. It is the most common way to share a color on the web.

Example code

css
color: #FF0000; /* red */
color: #1E66F5; /* a brand blue */
color: #FFF;    /* short for #FFFFFF, white */
Three pairs: red, green and blue, each from 00 to FF.

Common mistake

Describing a color as light blue. Share the hex code so nobody has to guess.

Key takeaways

  1. 1
    Six characters. Pairs for red, green and blue.
  2. 2
    00 to FF. None to full of each light.
  3. 3
    Exact and shareable. Copy it, get the same color.

Learn it properly