Color Picker
Pick a colour and get it in every format, with tints, shades, harmonies and the contrast it offers against text.
Loading tool…
Conversions happen in this page. Nothing is uploaded and no colour is recorded.
What the Color Picker does
This color picker will pick a colour and get it in every format, with tints, shades, harmonies and the contrast it offers against text. Everything runs inside this page, so the work happens on your own device rather than on a server. It is most often used for converting a hex colour to rgb() or hsl() for a stylesheet. The companion to this one is our markdown preview.
How to use it
- Pick a colour with the swatch, or type a hex, rgb(), hsl() or colour name.
- Copy whichever format you need from the table.
- Use the tint and shade strip for a scale built from the same hue.
- Check the contrast rows before putting text on it.
How it works
The same colour has to be written four or five different ways depending on where it is going — a hex in a design file, an rgb() in a stylesheet with an opacity, an hsl() when you want to adjust it systematically, CMYK for print, a plain integer in some APIs. Converting those by hand is exactly where transcription errors come from, and a wrong digit in a hex value is almost impossible to spot by eye.
HSL is worth understanding rather than just copying, because it is the format that makes colours adjustable. Hue is the position on the colour wheel in degrees, saturation is how much of the colour there is, lightness runs from black at 0 to white at 100. Building a tint ramp means holding hue and saturation and moving lightness, which is exactly what the strip on this page does — and why those tints look like a family rather than a set of unrelated colours.
The CMYK figures are an approximation and the page says so. RGB and CMYK do not describe the same set of colours: a saturated screen green simply does not exist in process ink, and the conversion here uses the simple arithmetic formula rather than an ICC profile. For anything going to a commercial printer, take the colour to the printer and let their profile do the conversion.
The contrast rows are there because the next question after choosing a colour is almost always whether text can sit on it. A mid-tone that fails against both black and white is a perfectly good colour for a shape and a bad one for a button, and finding that out here is cheaper than finding it out in an accessibility audit.
When to use it
- Converting a hex colour to rgb() or hsl() for a stylesheet.
- Building a tint and shade scale from one brand colour.
- Finding a complementary or analogous colour to pair with one you have.
- Checking whether text will be readable on a colour before using it.
Common mistakes to avoid
- Sending the CMYK values here to a commercial printer. Use the printer's own profile — this is an approximation.
- Building a tint ramp by mixing with white, which desaturates unevenly. Adjusting lightness in HSL keeps the family together.
- Choosing a mid-tone for a button without checking whether any text colour passes contrast on it.
Frequently asked questions
How do I convert hex to RGB?
Each pair of hex digits is one channel in base 16, so #4a90d9 is R=74, G=144, B=217. The table on this page does it for you along with HSL, CMYK and the integer form.
Are the CMYK values accurate for printing?
They are a mathematical approximation, not a colour-managed conversion. sRGB and CMYK cover different gamuts, so saturated screen colours have no exact ink equivalent. For commercial print, let the printer convert using their own profile.
What is HSL for?
Adjusting colours systematically. Because hue, saturation and lightness are separate, you can build a whole tint scale by moving one number, which is impossible to do predictably in hex or RGB.