Online Color Code Converter

Convert between HEX, RGB, and HSL color formats instantly.

#
R
G
B
H °
S %
L %

Understanding Web Color Models

Web colors are defined using different models. The three most common ones are HEX, RGB, and HSL. Understanding them helps in making better design decisions.

HEX (Hexadecimal)

A HEX code is a six-digit hexadecimal number used to represent a color. The format is #RRGGBB, where RR represents the red component, GG the green, and BB the blue. Each component has a value from 00 (0) to FF (255). It's the most compact and widely used format in web design.

RGB (Red, Green, Blue)

RGB is an additive color model where red, green, and blue light are combined to create a spectrum of colors. Each color component is an integer between 0 and 255. The format is rgb(red, green, blue). For example, rgb(255, 0, 0) is pure red.

HSL (Hue, Saturation, Lightness)

HSL is often considered more intuitive for humans to work with. It represents color based on three components: