Free Color Converter - HEX, RGB, HSL

Free color converter for HEX, RGB, HSL, HSV, CMYK and CSS names. Check WCAG contrast against white and black, and get tints and shades with one click.

  • No upload, 100% private
  • Instant, in your browser
  • 100% free, no signup
Loading tool…
Read the complete guideHEX, RGB, HSL and CMYK Colour Codes Explained (and Converted) →

About the Color Converter tool

Colours are written differently depending on where you work. Web developers use HEX and RGB, designers think in HSL or HSV, printers ask for CMYK, and CSS also accepts 148 colour names like tomato and teal. This colour converter translates one value into all of those formats at once, so you can move a brand colour from a logo file to a stylesheet or a print brief without errors.

Paste a colour in almost any form, such as #2563eb, rgb(37 99 235), hsl(221, 83%, 53%), cmyk(84, 58, 0, 8) or just a name, and every other format fills in instantly. You can also edit any single format directly or use the colour picker. If the colour has an exact CSS name it is shown; otherwise the nearest named colour is suggested.

Accessibility is built in. A contrast checker calculates the WCAG 2.1 contrast ratio of your colour against white and black and shows whether it passes AA and AAA for normal and large text. Below it, nine tints and nine shades are generated for building palettes and hover states. All calculations run in your browser.

How to use Color Converter

  1. Type or paste a colour into “Enter any colour”, pick one with the colour swatch, or click the random button.
  2. Read the HEX, RGB, HSL, HSV / HSB and CMYK values, or edit any one of them to update the rest.
  3. Choose a CSS name from the list to load a named colour, or see the nearest name for your current colour.
  4. Check the contrast ratios on white and black and the AA and AAA badges.
  5. Click a tint or shade to copy its HEX code, or double-click it to make it the current colour.

Features

Six formats in sync

HEX, RGB, HSL, HSV, CMYK and CSS colour names convert both ways instantly.

Flexible input

Understands shorthand hex, modern space-separated rgb(), percentages and all 148 CSS names.

WCAG contrast checker

Shows the exact contrast ratio against white and black with AA and AAA pass or fail indicators.

Tints and shades

Nine lighter and nine darker variations for building consistent UI palettes.

Nearest colour name

Finds the closest CSS named colour using a perceptually weighted distance.

When to use it

  • Convert a brand HEX code into CMYK values to send to a printer.
  • Turn a designer’s HSL values into HEX for a Tailwind or CSS variable file.
  • Check that a button colour has enough contrast for white text before launch.
  • Generate lighter and darker variants of a primary colour for hover and active states.
  • Find out what a colour name like cornflowerblue actually looks like in HEX.

Frequently asked questions

How do I convert HEX to RGB?

Paste the HEX code into the main box. The RGB value appears immediately. Each pair of hex digits is one channel from 00 (0) to FF (255).

Is the CMYK value accurate for printing?

It is a standard mathematical conversion without a colour profile, which is fine for most everyday use. For professional print work, confirm with your printer’s ICC profile because real inks vary.

What contrast ratio do I need for WCAG AA?

Normal text needs at least 4.5:1 and large text (18pt, or 14pt bold) at least 3:1. AAA requires 7:1 and 4.5:1 respectively.

What is the difference between HSL and HSV?

Both use hue and saturation, but HSL’s lightness runs from black through the pure colour to white, while HSV’s value runs from black to the pure colour. Design apps often call HSV “HSB”.

Does this tool support transparency?

The converter works with solid colours. If you paste an 8-digit HEX or rgba() value, the alpha channel is ignored.

Why do my HEX and RGB values differ slightly after converting from HSL?

HSL and CMYK use percentages, so converting them to whole-number RGB channels involves rounding. The difference is at most one step per channel and is not visible to the eye.

Related tools