Color Picker & Hex Converter

Pick a colour and convert it between HEX, RGB, HSL, HSV and CMYK — check its WCAG contrast, see it the way colour-blind readers do, and export it as CSS variables.

1 Pick a colour swatch, code or name

3 or 6 hex digits, with or without # — or a name like red, teal or crimson.

More formats: HSV & CMYK

CMYK is for print, not screens — the numbers here are the standard conversion, not a press proof.

#E8590C

Nearest named colour: —

2 Harmony palette colours that go with this one

Click any swatch to use that colour.

3 Contrast checker does this text read on that background?

The text colour follows your picked colour. Change the background to test it on light, dark or coloured surfaces — or swap them.

Background:

–

The quick brown fox jumps over the lazy dog.

Large text, 24px bold

4 Colour-blind preview how this colour looks to other eyes

About 1 in 12 men and 1 in 200 women see colours differently. If two colours in your palette look the same here, they are not distinguishable for those readers — change the lightness, not just the hue. Click a swatch to use it.

5 CSS variables paste-ready :root block

What are HEX, RGB and HSL?

Every colour on a screen is a mixture of red, green and blue light, and the three formats on this page are just three ways of writing down the same mixture. HEX is the web’s shorthand: #E8590C means red E8 (232), green 59 (89) and blue 0C (12) in hexadecimal. RGB writes the same three numbers in decimal: rgb(232, 89, 12). HSL describes the colour the way humans think about it: hue (where it sits on the colour wheel, 0–360°), saturation (how vivid it is, 0–100%) and lightness (how bright, 0–100%). Orange sits at a hue of about 21°, which is why this page starts on BBQ Tools orange.

The formats are interchangeable, and converting between them is pure arithmetic — which is why this tool can convert instantly and offline. What matters is knowing which one to use where: HEX for CSS and design files, RGB when you need to do maths on a colour, HSL when you need to make a colour lighter, darker or more muted without changing its basic character. Shifting the lightness of an HSL colour by 20 points gives you a clean lighter or darker version of the same colour; doing the same thing in RGB means guessing three numbers at once.

How to use the colour picker

  1. Pick a colour with the colour swatch, or type a HEX code, a colour name like crimson, or RGB / HSL / HSV / CMYK values directly — every field stays in sync.
  2. Read the conversions. The preview shows the colour at full size with its HEX code, and the CSS box gives you the colour ready to paste into a stylesheet.
  3. Try a matching colour. Pick a harmony rule — complementary, analogous, triadic, split complementary, tetradic or monochromatic — and click any swatch to make it the current colour.
  4. Check the contrast. The checker compares your colour against a background and shows the WCAG ratio plus which levels pass: AA and AAA for normal and large text, and 3:1 for interface components.
  5. Export CSS variables. Copy the ready-made :root block with --color-primary and its matching colours, and paste it straight into your stylesheet.

Three everyday uses

1. Matching a brand colour from a screenshot

You have a logo, a screenshot or a photo, and you need the exact colour from it. Sample the colour in an image editor, paste the HEX code here, and you get the RGB and HSL equivalents plus a set of colours that go with it. The complementary swatch is the starting point for a button colour that stands out against a brand background; the lighter and darker swatches give you hover states without guessing.

2. Building a palette for a page or a slide deck

A page needs more than one colour, but colours chosen at random clash. Start with one main colour, then take its analogous neighbours (30° either side on the wheel) for a calm, harmonious scheme, or its complementary colour for something bold. The triadic swatches give a three-colour scheme that stays balanced. Copy the HEX codes into your stylesheet or your slide template and the palette is consistent everywhere.

3. Fixing a colour that looks wrong in code

A colour that looks right in a design tool and wrong in the browser is usually a format mistake: a missing # in a HEX code, a value over 255 in RGB, or a hue written as a percentage. Paste the value here and the tool either converts it or tells you exactly what is wrong with it. HSL is also the fastest way to fix “too bright” or “too washed out” — move lightness down or saturation up and the colour is fixed without touching the hue.

Common mistakes to avoid

  • Forgetting the # in HEX. E8590C without the hash is not a valid CSS colour. Browsers ignore it silently, which is why the colour “does nothing”.
  • Using RGB values over 255. Each channel runs 0–255. A value of 300 is invalid, and some tools clamp it silently while others reject the whole colour.
  • Picking text and background too close together. Light grey text on a white background fails contrast checks and is unreadable for many people. Use the contrast checker above: body text needs at least 4.5:1 against its background, and the checker tells you the exact ratio.
  • Using too many colours. A page with seven unrelated colours looks accidental. One main colour, one accent, and shades of the two will look designed; seven will look like a mistake.
  • Trusting a colour on one screen. The same HEX code looks different on a phone, a laptop and a projector. For anything that must match exactly — a logo, a brand colour — check it on the device your audience will use.

Frequently asked questions

What is the difference between HEX and RGB?
None, in terms of the colour — they are the same three numbers written two ways. HEX writes them in base 16 (#E8590C), RGB in base 10 (rgb(232, 89, 12)). Use HEX in CSS, RGB when you need to calculate with the values.
What does HSL mean?
Hue, Saturation, Lightness. Hue is the position on the colour wheel (red 0°, green 120°, blue 240°), saturation is vividness, lightness is brightness. HSL is the easiest format for adjusting a colour: change lightness to make it lighter or darker without changing its character.
Why does my HEX code not work?
Usually a missing # at the start, a letter outside A–F, or the wrong length — HEX codes are 3 digits (#F60) or 6 digits (#FF6600), nothing else. Paste it here and the tool will say what is wrong.
How do I pick colours that go together?
Use the harmony rules: analogous colours (neighbours on the wheel) are calm, complementary colours (opposites) are bold, triadic colours (120° apart) are balanced. Start with one colour you like and let the wheel do the rest.
What contrast ratio do I need for text?
WCAG asks for at least 4.5:1 for normal body text (AA) and 7:1 for AAA, 3:1 for large text (AA) and 4.5:1 for large text (AAA), and 3:1 for interface components like input borders and icons. The contrast checker on this page works out the ratio for your exact two colours and shows which levels pass.
How do I see my colour the way colour-blind readers see it?
The colour-blind preview shows your current colour as it appears with protanopia (no red), deuteranopia (no green), tritanopia (no blue) and achromatopsia (no colour at all). If two colours in your palette collapse into the same shade in one of those views, they are not distinguishable for those readers — change the lightness, not just the hue.
Can I export the palette as CSS variables?
Yes. The CSS variables box gives you a ready-made :root block with --color-primary, its RGB triplet, and the complementary, analogous, light and dark partners — copy it and paste it straight into your stylesheet.
Is this colour picker free?
Yes. No account, no limits, and every conversion happens in your browser.

Privacy

Colours are converted locally in your browser. Nothing is sent to a server or stored.

Worked example: a palette from one brand colour

Start with a single brand colour — say this site’s orange, #E8590C, which is hue 21°, saturation 90%, lightness 48%. Paste it in and the swatches give you a whole palette for free. The complementary colour sits opposite on the wheel at 201°, a deep blue — use it sparingly for links and buttons that must stand out against the orange, because opposites shout. The two analogous colours at 351° (a red-orange) and 51° (an amber) sit next to the orange and are calm enough for backgrounds and secondary elements. The triadic partners at 141° (green) and 261° (purple) complete a three-colour scheme that stays balanced because the hues are evenly spaced.

Then take the lighter and darker swatches: lightness 68% gives a soft peach for hover states and highlights, lightness 28% gives a dark burnt orange for text on light backgrounds. That is six usable colours from one starting point, and they all share the same hue family, so the page looks designed rather than assembled. The rule that makes this work is simple: change lightness and saturation to create variants, and change hue only when you deliberately want contrast.

Contrast: the check most people skip

A colour combination can look fine and still be unreadable. Accessibility guidelines (WCAG) ask for a contrast ratio of at least 4.5:1 for normal body text and 3:1 for large text at level AA, and 7:1 / 4.5:1 at level AAA; interface components such as input borders and icons need 3:1. The checker above works out the exact ratio for your two colours and shows which of those levels pass — try your colour on white, then on black, then on the sage and dark-green presets to see how it behaves on real surfaces. White text on this orange (lightness 48%) passes comfortably; light grey text on a white background does not. When in doubt, darken the text or lighten the background — a small lightness shift fixes most contrast problems without changing the palette.

Colour blindness: same colour, different eyes

About 1 in 12 men and 1 in 200 women have some form of colour-vision deficiency, most commonly red–green. The preview above shows your colour as it appears with protanopia (no red), deuteranopia (no green), tritanopia (no blue) and achromatopsia (no colour at all). Two colours that differ only in hue — a red and a green of the same lightness, for example — can collapse into the same shade for those readers, which is why red/green alone should never be the only way to tell “error” from “success”. If a pair looks identical in one of the four views, change the lightness, not just the hue: a dark red against a light green stays distinguishable even when the hues merge.

CSS variables: the palette, ready to paste

Once the colour and its partners look right, the CSS variables box gives you a :root block with --color-primary, its RGB triplet for translucent overlays (rgba(var(--color-primary-rgb), 0.5)), and the complementary, analogous, light and dark partners. Paste it into your stylesheet once and use the variables everywhere — changing the brand colour later means editing one line instead of hunting through every rule. The harmony swatches above are the source of those variables, so the exported palette always matches what you see on screen.

Share this tool

Copy the link below and paste it anywhere — a chat message, an email, a document. Whoever opens it gets the same free tool, with no account and nothing to install.

Related tools