Colour Picker & Converter
Pick a colour or paste HEX, RGB or HSL and convert it to every format, including HEX to RGB. Shows the CSS name and contrast.
Runs in your browser. Nothing is uploaded.
- HEX
- RGB
- HSL
- OKLCH
- HWB
- OKLAB
- HSV / HSB
- CMYK
- RGB 0–1
How to use the Colour Picker & Converter
- Type a colour in any format, such as
#2f6fd8,rgb(47 111 216),hsl(217 69% 52%),oklch(55% 0.17 260)ortomato, or use the colour picker. - In Chrome and Edge, press Pick from screen to sample any pixel on your screen.
- Adjust Opacity to add transparency.
- Copy the colour in the format you need with the button next to it.
- Check the closest CSS colour name and how readable the colour is as text on white or black.
Every colour format in one place
Colours turn up in many notations. Design tools hand you HEX codes, CSS code uses rgb() and
hsl(), modern stylesheets use oklch(), print needs CMYK, and code for games or graphics wants
values from 0 to 1. Converting by hand means remembering formulas and making rounding mistakes. This
tool takes a colour in any common format and shows it in all of them at once, ready to copy.
HEX to RGB and back
Paste a HEX code such as #e4572e or a shorthand like #f80 and the RGB value appears straight away,
along with every other format. It works the other way too: type rgb(228 87 46) to get the HEX code.
Eight-digit HEX codes with transparency become rgb() with an alpha value.
What you get for each colour
- HEX, the most common code on the web, with two extra digits for transparency when needed.
- RGB and RGB 0–1, for CSS and for code that expects channels as decimals.
- HSL and HWB, which describe hue with lightness or whiteness and blackness, handy for tweaking a colour by hand.
- OKLCH and OKLAB, perceptual formats where equal steps look equal to the eye.
- HSV / HSB, used in many design apps’ colour pickers.
- CMYK, as a starting point for print.
The tool also tells you the matching CSS colour name, or the closest one, and how much contrast the colour has as text on white and on black.
Pick it from anywhere
Use the colour picker for a quick choice, or press Pick from screen in Chrome and Edge to sample a pixel from any window, such as a screenshot, a mock-up or another website. The opacity slider adds transparency, and every format updates to include it.
Readable text
Under the formats you see contrast ratios against white and black. Normal text needs at least 4.5:1 to meet the WCAG accessibility guideline. For a detailed check against any background, use the Colour Contrast Checker. To build a full scheme around a colour, try the Colour Palette Generator.
Your last colour is remembered in this browser, and nothing is sent anywhere.
Frequently asked questions
Which formats can I type?
HEX with 3, 4, 6 or 8 digits (with or without #), rgb() and rgba(), hsl() and hsla(), hwb(), oklch(), oklab() and the 148 CSS colour names. Both the classic comma syntax and the modern space syntax work.
What is OKLCH and why use it?
OKLCH describes colour as lightness, chroma (colourfulness) and hue, in a way that matches how people see. Changing only lightness keeps the colour looking like the same hue, which makes it great for building shades and themes. All current browsers support it in CSS.
Why do the HEX and RGB values look rounded?
HEX and RGB store each channel as a whole number from 0 to 255, so values from other formats are rounded to the nearest one. The difference is too small to see.
How accurate is CMYK?
It is a simple mathematical conversion, useful as a starting point. Printers use colour profiles for their inks and paper, so ask your print shop for exact values.
Is anything uploaded?
No. Conversions happen in your browser, and the screen picker only reads the pixel you choose.
Tutorials
How to add transparency to a HEX colour in CSS
Turn a HEX brand colour into RGB so you can make it see-through with rgba() or an 8-digit HEX code, for overlays, shadows and hover states.
How to use OKLCH colours in your CSS
Convert a brand colour to OKLCH, understand its three numbers, and create lighter and darker versions that keep the same hue for hover states and themes.