Color converter

Paste a color in any format — HEX, rgb(), hsl(), hsb(), cmyk(), oklch(), lab(), plain “38, 70, 83” or even a color name — and get every other format instantly, including code for Tailwind, SwiftUI, Android and Flutter. Click any value to copy it.

#3E5C76 = rgb(62, 92, 118) = hsl(208, 31%, 35%).

How to use the color converter

  1. Type or paste a color in any notation, or pick one with the swatch.
  2. Every other format updates as you type.
  3. Click a value to copy it — HEX, RGB, HSL, CMYK, OKLCH, Lab and more.
  4. Grab platform code for SwiftUI, Android, Flutter or a Tailwind arbitrary value.

How do I convert HEX to RGB?

A HEX code is three pairs of base-16 digits for red, green and blue. Convert each pair to decimal: #3E5C76 → 3E = 62, 5C = 92, 76 = 118, so the color is rgb(62, 92, 118). This converter does that — and every other format — automatically.

Which format should I use?

Use HEX or RGB for everyday web work, HSL when you want to tweak lightness or saturation by hand, CMYK as a starting point for print (always proof with your printer), and OKLCH for building consistent, accessible color scales in modern CSS.

Frequently asked questions

Can I convert RGB to HEX?

Yes. Paste rgb(62, 92, 118) or just 62, 92, 118 and the HEX value (#3E5C76) appears instantly, along with every other format.

Is HEX to CMYK conversion accurate for print?

The CMYK values are a mathematical conversion without a printer profile. They are a good starting point, but print colors depend on paper and ink, so check a proof.

Does it support OKLCH and Lab?

Yes — both input and output, along with LCh, XYZ, HWB and HSB/HSV.

More free color tools