Color format converter

Convert a color between HEX, RGB and HSL, including alpha, with a validated preview.

HEX with 3/4/6/8 digits; RGB 0–255 or percentages; HSL hue 0–360 and saturation/lightness 0–100%. Use commas and alpha 0–1. Contrast accepts opaque colors only.

How to use

Enter a supported color and process it. Review the preview and all three formats, then copy the result or download it as text.

Try an example

#FF0000 produces rgb(255, 0, 0) and hsl(0, 100%, 50%).

Support & limits

Calculations use sRGB. HEX rounds each channel and alpha to 8 bits; RGB/HSL display up to four decimal places. Repeated conversions may add rounding; this does not convert color profiles.

Common questions

Is transparency supported?

Yes, using 4/8-digit HEX or rgba/hsla with alpha from 0 to 1. The preview background can affect appearance; output values remain explicit.

Related tools