Color Converter
Convert a colour between HEX, RGB, HSL, HSV and CMYK, with a preview and a contrast check.
Type a colour in any format.
How to use the Color Converter
- Type or paste a colour: a hex code, an rgb() or hsl() value, or a CSS colour name.
- See the colour and its value in every format.
- Copy the format you need.
Which format should I use?
HEX and RGB describe the same thing — how much red, green and blue — and are the standard on the web. HSL describes a colour by hue, saturation and lightness, which makes it easy to create lighter or darker versions. CMYK is used for print; the value shown here is a simple conversion, and a print shop's colour profile will give slightly different numbers.
Frequently asked questions
What is the contrast figure?
It is the WCAG contrast ratio between your colour and black or white text. A ratio of 4.5:1 or more is the accessibility standard for normal-sized text.
Can I enter a colour with transparency?
Yes. Use an 8-digit hex code such as #ff4f6780, or rgba() and hsla() values.
Why is the HSL value slightly different after converting back?
HSL values are rounded to whole numbers, so converting there and back can shift a colour by one step, which is not visible.
Is what I type sent to a server?
No. This tool runs entirely in your browser, so nothing you enter leaves your device.