Color Codes

Complete reference for HEX, RGB and HSL color codes. Browse every major color, see all three formats side by side, and copy the one you need.

What Are Color Codes?

Color codes are standardized notations for specifying colors on computers, screens and print. The three most common are HEX (used in HTML and CSS), RGB (used in JavaScript, canvas and graphics APIs) and HSL (used in design systems and modern CSS). Each format describes the same underlying sRGB color, just with different notation.

The Three Main Color Code Formats

  • HEX: Six hexadecimal digits like #155EEF — two digits each for red, green and blue.
  • RGB: Three integers 0–255 like rgb(21, 94, 239) — the same three channels written as decimals.
  • HSL: Hue, saturation, lightness like hsl(215, 84%, 51%) — expressed as a hue angle and two percentages.

Frequently Asked Questions