HEX / RGB / HSL Color Converter
HEX / RGB / HSL Color Converter shows one colour in all three CSS notations.
How to use it
- Type a HEX code or pick a color with the color picker
- Read the RGB and HSL equivalents, updated instantly
- Copy any format to your clipboard with one click
Type a HEX code (3 or 6 digits, with or without the #), use the native colour picker, or enter RGB channels or HSL values, and the other formats follow. HSL numbers are rounded to whole degrees and whole per-cents, so a HEX to HSL and back can land one step away from where it started. It handles opaque colours only — there is no alpha channel, so no #RRGGBBAA, rgba() or hsla() — and no named colours like "rebeccapurple", CMYK, LAB, LCH or OKLCH. Output is a lowercase #rrggbb, rgb(r, g, b) and hsl(h, s%, l%), each copyable. To check a text-and-background pair against WCAG use the WCAG Contrast Checker; to fan a colour out into a set use the Color Palette Generator.
FAQ
No. Only opaque colours are handled. #RRGGBBAA, rgba() and hsla() are not accepted, and the colour picker only ever produces a solid #rrggbb.
HSL output is rounded to whole numbers — degrees for hue, per-cent for saturation and lightness — so a few units of rounding can shift the value by one step on the way back.
No. Input and output are HEX, RGB and HSL only. Named colours and other colour models are not supported.