Convert HEX color codes to RGB, HSL, and CSS-ready values. Click the color swatch to use your browser's color picker, or type any hex code directly. See also: RGB to Hex.
Runs in your browser · No data sent anywhereA hex color is a 6-character code (preceded by #) representing Red, Green, and Blue channels in hexadecimal: #RRGGBB. Each channel ranges from 00 (0) to FF (255). 3-character shorthand (#RGB) is also valid — #abc expands to #aabbcc.
HSL stands for Hue, Saturation, Lightness. Hue is a degree on the color wheel (0–360). Saturation is how vivid the color is (0%–100%). Lightness is how light or dark it is (0% = black, 100% = white, 50% = pure color).
All three formats work in CSS. Hex is the most compact. rgb() is readable for humans. hsl() is easiest for creating color variations (just adjust lightness). Modern CSS also supports color() for wide-gamut colors.
Alpha controls transparency. rgba(0,0,0,0.5) is 50% transparent black. In hex, #00000080 uses the last two digits for alpha. CSS also supports rgb(0 0 0 / 50%) syntax.