Color Converter

Convert HEX, RGB, HSL, HSB, CMYK and OKLCH colors.

Your input

HEX
#3498db
RGB
rgb(52 152 219)
RGB (percent)
rgb(20.4% 59.6% 85.9%)
HSL
hsl(204 70% 53%)
HSB / HSV
hsb(204, 76%, 86%)
CMYK
cmyk(76%, 31%, 0%, 14%)
OKLCH
oklch(65.31% 0.1347 242.69)
OKLAB
oklab(65.31% -0.0618 -0.1197)
  • Paste any CSS color: #hex (3, 4, 6 or 8 digits), rgb(), hsl(), oklch(), oklab() or a common color name. CMYK is the simple screen formula, not a print profile. OKLCH is the perceptual space CSS now supports: equal lightness steps look equal.

What does a color converter do?

The same color can be written in many ways. A screen color may be a HEX code like #3498db, an RGB triple like rgb(52 152 219), or HSL, which describes hue, saturation and lightness. A converter shows the same color in each format so you can use whichever your tool needs.

This tool accepts any CSS color, including HEX with 3, 4, 6 or 8 digits, rgb(), hsl(), oklch(), oklab() and common names such as rebeccapurple. It shows HEX, RGB, HSL, HSB, CMYK, OKLCH and OKLAB with a swatch. OKLCH and OKLAB are perceptual spaces, designed so that equal steps look equal to the eye.

How to use the Color Converter

  1. Type or paste a color.
  2. Choose upper or lower case for HEX letters.
  3. Read the swatch and every format.
  4. Copy the one you need.

Conversions between screen formats are exact to the rounding shown, but colors on different screens and in print can still look different. CMYK here is a simple formula, not a print profile.

Real situations

When people use the Color Converter

  • 1

    Move a color between design tools

    Take a HEX from a design file and get the HSL or RGB value your stylesheet or app needs.

  • 2

    Build lighter and darker shades

    Convert to HSL, change the lightness number and convert back, which is easier than editing HEX.

  • 3

    Use modern CSS color spaces

    Get the oklch() value for a brand color to use in a modern stylesheet.

  • 4

    Check what a color name means

    Type a CSS color name such as rebeccapurple and see its exact values.

FAQ

Color Converter: questions answered

What are the values for #3498db?

RGB is rgb(52 152 219), HSL is hsl(204 70% 53%), HSB is hsb(204, 76%, 86%) and CMYK is cmyk(76%, 31%, 0%, 14%). In OKLCH it is oklch(65.31% 0.1347 242.69).

Is the CMYK value suitable for printing?

No. It uses the simple screen formula and has no printer profile, so it is only a rough guide. Real print work needs the printer's own color profile and a proof.

What is the difference between HSL and HSB?

Both describe hue, saturation and a brightness-like value, but they define the last two differently. Pure red is hsl(0 100% 50%) in HSL and hsb(0, 100%, 100%) in HSB. Use whichever your tool expects.

What is OKLCH and why use it?

OKLCH describes a color by lightness, chroma and hue in a space designed to match human vision. Changing lightness by the same amount looks like the same step to the eye, which is not true of HSL. It is supported in modern CSS.

What color formats can I paste?

HEX with 3, 4, 6 or 8 digits, rgb(), hsl(), oklch(), oklab() and common color names. Colors with transparency are accepted and shown.

Why does rebeccapurple look familiar?

It is a named CSS color added in 2014 in memory of a young girl. It is #663399, which is rgb(102 51 153) and hsl(270 50% 40%).

Is this Color Converter free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way