Colour Converter (HEX, RGB, HSL)

Convert colours between HEX, RGB, HSL and CMYK, pick colours visually and check WCAG contrast against white and black text.

Runs in your browser Free · No sign-up

Loading tool…

How to use the Colour Converter (HEX, RGB, HSL)

  1. Enter a colour such as #1d4ed8 or rgb(29, 78, 216), or use the colour picker.
  2. Copy the HEX, RGB, HSL or CMYK value you need.
  3. Check the contrast ratios to choose readable text colours.

About this tool

Designers and developers often need the same colour in several formats. Enter any HEX, RGB or HSL value, or use the picker, and copy whichever format you need. The contrast check shows whether text on that colour is readable.

  • Private: your data is processed on your device and never uploaded.
  • Free with no account, limits or watermarks.
  • Fast: results appear instantly, even offline once the page has loaded.

Frequently asked questions

How do I convert HEX to RGB?

Split the six digits into three pairs and convert each from hexadecimal to decimal: #1d4ed8 → 1d = 29, 4e = 78, d8 = 216, so rgb(29, 78, 216).

Is the CMYK value exact for printing?

No. It is a simple mathematical conversion. Professional printing uses colour profiles, so ask your printer for exact values.