Convert Colours Between Formats
Enter a colour in any CSS format — a HEX code like #3B82F6 or #38F, rgb() or rgba(), hsl(), or a name such as tomato — or choose it with the colour picker. The tool shows the same colour as HEX, RGB, HSL, HSV and CMYK, ready to copy into your CSS, design tool or print settings.
It also shows how readable white or black text is on that colour, as a WCAG contrast ratio: 4.5:1 or more meets the AA level for normal text. The colour is read by your browser exactly as CSS would read it.
Why Use This Colour Converter?
- HEX, RGB, HSL, HSV and CMYK in one place
- Accepts every CSS colour format and colour name
- Transparency (alpha) supported
- WCAG contrast with white and black text
How to Convert a Colour
- Type or paste a colour, or pick one with the colour picker
- See the colour in every format next to its preview
- Click the copy button next to the format you need
Frequently Asked Questions
Is this colour converter free?
Yes, it is completely free and works in your browser.
What is the difference between RGB, HSL and HSV?
RGB mixes red, green and blue light (0–255 each). HSL and HSV describe the same colour by hue (0–360°), saturation and lightness or value, which makes it easier to create lighter, darker or more muted variants.
What does the contrast ratio mean?
It compares the brightness of the text and background colours (WCAG 2). A ratio of at least 4.5:1 is required for normal text at level AA, 3:1 for large text; the higher, the easier to read.
Is anything sent to a server?
No. Everything is calculated in your browser.