Home / Developer / Color Converter

Color Converter

Convert colours between HEX, RGB, CMYK and HSL โ€” for screens, design and print.

Enter a valid HEX colour such as #1FAA55 or #FFF.

RGB
CMYK
HSL

About this color converter

Different jobs use different colour systems: screens and websites use HEX and RGB, printers use CMYK, and designers often think in HSL. Type or pick any colour above to get all four values at once, with one-click copying โ€” useful for matching a website colour to a printed brochure, a brand palette to a CSS stylesheet, and everything in between.

How to use it

  1. Type a HEX value (such as #1FAA55) or use the colour picker.
  2. Read the RGB, CMYK and HSL equivalents under the preview.
  3. Click Copy next to the value you need and paste it into your design tool or code.

The formula

CMYK from RGB: K = 1 - max(R,G,B) ยท C = (1 - R - K) / (1 - K) (same pattern for M and Y), using R, G, B scaled to 0-1.

Worked example

The green #1FAA55 is rgb(31, 170, 85) on screen and cmyk(82%, 0%, 50%, 33%) in print.

Frequently asked questions

Which format should I use for printing?

CMYK. Printers mix cyan, magenta, yellow and black inks, so send CMYK values to a print shop. Note that some bright screen colours cannot be reproduced exactly in CMYK and may print slightly duller.

Which format should I use on a website?

HEX or RGB in your CSS โ€” both describe the same screen colour. HSL is convenient when you need lighter or darker shades of the same hue: keep H the same and adjust L.

Why do my printed colours look different from the screen?

Screens emit light (RGB) while paper reflects it (CMYK), and the CMYK colour range is smaller. Colours are converted, not copied, so small shifts are normal โ€” ask your printer for a proof for brand-critical work.

What is the difference between HEX and RGB?

Nothing in the colour itself โ€” HEX is just RGB written in base 16. #1FAA55 means R=1F (31), G=AA (170), B=55 (85).