Color Converter
Enter a color in any format — HEX, RGB, or HSL — and instantly convert it to all other formats.
Color Formats Explained
HEX uses six hexadecimal digits to represent red, green, and blue channels (e.g. #FF5733). RGB expresses color as three decimal values from 0-255 for each channel. HSL describes color using Hue (0-360), Saturation (0-100%), and Lightness (0-100%) — often more intuitive for adjusting colors.
#RRGGBB — each pair is a hexadecimal value (00–FF) representing a color channel intensity
Split into R, G, B pairs and convert each from hex to decimal (00 → 0, FF → 255)
rgb(R, G, B) — three decimal values from 0 to 255 representing red, green, and blue channels
R, G, B values divided by 255 to get values in [0, 1]
L = (max(R,G,B) + min(R,G,B)) / 2 — the midpoint of the brightest and darkest channels
S = (max - min) / (1 - |2L - 1|) — measures color intensity, 0 = gray, 1 = fully saturated
H = angle on the color wheel (0–360°) — computed from which channel is dominant and the delta between channels
hsl(H, S%, L%) — hue in degrees, saturation and lightness as percentages
Spec: CSS Color Level 4 (W3C), sRGB color space