Color converter
Convert a colour to HEX, RGB, HSL, HSV, CMYK, LAB and OKLCH, with contrast.
Related tools
All Colours & CSS tools →This free color converter turns any color between HEX, RGB and HSL instantly in your browser. Enter a value in one format and read it in all the others, ready to paste into CSS, a design tool or your code. It's perfect for matching brand colors, building palettes and tweaking shades without guesswork.
How to use it
- Enter a color as HEX, RGB or HSL.
- Read the equivalent values in every other format.
- Copy the format you need into your project.
Frequently asked questions
How do I convert HEX to RGB?
A HEX color like #4287f5 is three pairs — red (42), green (87), blue (f5) — each read as a hex number from 0–255. This tool does the conversion for you instantly.
What is HSL?
HSL stands for Hue, Saturation and Lightness. It's often easier than RGB for tweaking a color — raise lightness for a tint, lower saturation to mute it, shift hue to change the color.
What's the difference between HEX and RGB?
They describe the same color — HEX is a compact base-16 notation (#ff0000) while RGB lists the channels as decimals (rgb(255,0,0)). Both are fully supported in CSS.
Can I use these values in CSS?
Yes. HEX, rgb() and hsl() are all valid CSS color values — copy whichever fits your stylesheet or design system.
What is Color converter?
Convert a colour to HEX, RGB, HSL, HSV, CMYK, LAB and OKLCH, with contrast.
When would I actually use this?
Moving a colour between a design tool and a stylesheet, building a palette around one brand colour, and checking text will be readable on it.
What is the most common mistake?
Judging contrast by eye. Two colours that look distinct on a bright monitor can fail the accessibility ratio outright, and the ratio is the thing an audit will measure.
How is Color converter different from Color Contrast Checker?
They sit next to each other but answer different questions: Color Contrast Checker is the one to open when you need it to wCAG contrast ratio between text and background, with AA/AAA pass-fail and a live preview. Pick whichever matches what you're starting from — both are free.
Is there a tool for the next step?
Color Inverter is the closest one after this: Invert a colour (255 − RGB) or take its complement, in HEX/RGB/HSL/CMYK with the contrast between them.
What else is worth having open alongside it?
Color Scheme Generator and Image Color Picker — they come up in the same task often enough to be worth a second tab.