Color Converter
Convert colours between HEX, RGB, HSL, HWB, CMYK and OKLCH, pick from the screen, and check contrast for readable text.
How to use the color converter
- Type or paste a colour in any format:
#7c3aed,rgb(124, 58, 237),hsl(262 83% 58%),cmyk(48%, 76%, 0%, 7%),oklch(0.54 0.25 293)or a name liketomato. You can also use the colour picker, or pick a colour from anywhere on your screen in Chrome and Edge. - Copy the colour in the format you need. Every format describes exactly the same colour.
- Check the contrast boxes to see whether text in this colour is readable on white or black.
- Use the tints and shades for hover states, borders and backgrounds that match.
Colour formats at a glance
| Format | Example | Used for |
|---|---|---|
| HEX | #ff8800 | Web pages, design tools, brand guides |
| RGB | rgb(255, 136, 0) | Screens, CSS, image editors |
| HSL | hsl(32, 100%, 50%) | Adjusting lightness and saturation |
| HWB | hwb(32 0% 0%) | Mixing with white and black |
| CMYK | cmyk(0%, 47%, 100%, 0%) | Printing |
| OKLCH | oklch(0.744 0.181 56.5) | Modern CSS and even colour scales |
Frequently asked questions
How do I convert HEX to RGB?
Split the six digits into three pairs and read each pair as a hexadecimal number from 0 to 255. #FF8800 is FF = 255 red, 88 = 136 green and 00 = 0 blue, so rgb(255, 136, 0). A three-digit code such as #F80 doubles each digit: #FF8800.
How do I convert RGB to HEX?
Write each of the red, green and blue values (0–255) as a two-digit hexadecimal number and join them after a #. rgb(124, 58, 237) is 7C, 3A and ED, so #7C3AED.
What is HSL, and when is it useful?
HSL describes a colour by hue (its place on the colour wheel, 0–360°), saturation (how vivid) and lightness (how light or dark). It makes it easy to create lighter, darker or softer versions of a colour by changing one number, which is why designers like it.
Why does my CMYK print look different from the screen?
Screens mix light (RGB) and printers mix inks (CMYK), and many bright screen colours cannot be printed. The CMYK values here are the simple standard conversion; a print shop converts with a colour profile for its own paper and inks, so ask them for the exact values for important brand colours.
What is OKLCH?
OKLCH is a newer way to write colours, supported in all current browsers. Its lightness matches what the eye sees, so two colours with the same L look equally light, which makes it good for building colour scales. The tints and shades on this page are made in OKLCH.
What contrast ratio do I need for readable text?
The WCAG accessibility guidelines ask for at least 4.5:1 between text and its background for normal text, and 3:1 for large text (about 24 px, or 19 px bold). 7:1 meets the stricter AAA level. The converter checks your colour against white and black.
Related tools
Browse all tools- Number Base Converter Convert numbers between binary, octal, decimal and hexadecimal (or any base from 2 to 36), and text to binary or hex.
- Image Converter Convert images between JPG, PNG, WebP, AVIF and ICO, resize them, and download one by one or as a ZIP. Nothing is uploaded.
- Unit Converter Convert between more than 130 units in 14 kinds: length, weight, temperature, volume, area, speed, time, data, pressure, energy, power, fuel economy, angle and frequency.
- CSV to JSON Converter Turn CSV into JSON, or JSON into CSV, with delimiter detection, headers, number types and nested objects flattened. Paste or open a file.
- Base64 Encoder and Decoder Encode text or files to Base64 and decode Base64 back to text or a file, with UTF-8, URL-safe and data URL options.