Skip to content
EASE+ ToolsEASE+ Tools

Color Code Converter

Convert colours between HEX, RGB, HSL and CMYK, and find the closest Pantone and RAL colours.

Inputs

Example
I have a

For example #2457C5, rgb(36, 87, 197) or hsl(221, 69%, 46%).

Result

HEX
#2457C5
RGB
rgb(36, 87, 197)
HSL
hsl(221, 69%, 46%)
CMYK (uncalibrated)
cmyk(82%, 56%, 0%, 23%)
Closest Pantone (approx.)
2935 C
Closest RAL Classic
RAL 5007 Brilliant blue

Closest Pantone Coated (unofficial approximations)

  • PANTONE 2935 C#0057B8 · ΔE 3.2, close
  • PANTONE 7455 C#3A5DAE · ΔE 3.6, close
  • PANTONE 2726 C#485CC7 · ΔE 4.1, close

Screen approximations, not licensed Pantone data. Check a physical Pantone guide before printing.

Closest RAL Classic

  • RAL 5007 Brilliant blue#41678D · ΔE 7.8, nearest available
  • RAL 5017 Traffic blue#0E518D · ΔE 8.1, nearest available
  • RAL 5023 Distant blue#4D668E · ΔE 8.7, nearest available

Screen approximations. Values: Wikipedia, List of RAL colours (CC BY-SA 4.0) (opens in a new tab)

About this tool

Designers, developers, printers and paint suppliers each work in a different colour system. Paste a colour in HEX, RGB or HSL to get the other screen formats and a starting CMYK value, plus the three closest Pantone Coated and RAL Classic colours with how close each one is. The value you typed is never changed, so converting back and forth does not drift.

  1. Choose the format you have.
  2. Type or paste the colour.
  3. Copy the format you need, or pick from the three closest Pantone and RAL matches.
  4. Before printing or ordering paint, confirm the match against a physical Pantone or RAL guide.

Formula

HEX is the RGB channels written in base 16. HSL comes from RGB: lightness = (max + min) ÷ 2, saturation from the spread between them, and hue from which channel is largest. CMYK uses K = 1 − max(R, G, B) and C = (1 − R − K) ÷ (1 − K), likewise for M and Y. Closest matches are ranked by CIEDE2000 colour difference (ΔE00) in CIELAB: under 1 is indistinguishable, under 2 very close, under 5 close.

Worked example

#2457C5 is rgb(36, 87, 197), hsl(221, 69%, 46%) and roughly cmyk(82%, 56%, 0%, 23%). Pantone 186 C is approximately #C8102E, so entering #C8102E returns PANTONE 186 C with a ΔE00 of 0.0.

Assumptions and limits

  • CMYK is a simple uncalibrated conversion. Real print values depend on the press, paper and ICC profile; ask your printer for their profile.
  • Pantone matches are unofficial screen approximations of Pantone Coated colours, not licensed Pantone data, and newer Pantone colours may be missing. PANTONE is a trademark of Pantone LLC.
  • RAL matches use sRGB approximations of the 217 RAL Classic colours from Wikipedia (CC BY-SA 4.0). RAL is a trademark of RAL gGmbH.
  • Screens show colours differently. Always confirm with a physical guide before printing, painting or ordering.
  • HEX accepts 3 or 6 digits. Transparency (alpha) is not supported.

Questions

How accurate are the Pantone and RAL matches?

They are the closest screen approximations, ranked by CIEDE2000. A ΔE under 2 is a close visual match on screen, but printed inks and paints can still look different, so check a physical guide.

Why is my CMYK different from my printer's?

Printers convert with an ICC profile for their press and paper. This tool uses the simple formula, which is fine for a starting point but not for final artwork.

Which format should I use in CSS?

Any of HEX, RGB or HSL. HEX is the most compact; HSL is easiest to adjust by hand, for example to make a colour lighter.