Color tools

Color converter— one color, seven formats

Enter a HEX, RGB, HSL, HSV, CMYK, Lab or OKLCH value; the matching formats appear together.

color converter

Color input

Your color stays in this browser tab. No upload or saved history.

Converted values

HEX#3B82F6
RGBrgb(59 130 246)
HSLhsl(217.2 91.2% 59.8%)
HSVhsv(217.2, 76%, 96.5%)
CMYKcmyk(76%, 47.2%, 0%, 3.5%)
Lablab(54.619% 8.771 -65.783)
OKLCHoklch(62.308% 0.188 259.81)

Within sRGB gamut.

sRGB and OKLCH use D65; CSS Lab uses D50. CMYK is a formula estimate without an ICC profile.

Transparency

Seven color values are current.

A design token arrives as HEX while the stylesheet uses OKLCH and a print mockup lists CMYK. A color converter should show which numbers describe the same screen color and where that equivalence ends.

Use this color converter for HEX to RGB, RGB to HSL, an OKLCH converter check, or a CMYK converter estimate. The swatch and gamut note keep the numbers tied to a visible color.

Why use this color converter

Keep the source and the displayed result distinct

See the gamut change before copying

An OKLCH or Lab value can describe a color beyond sRGB. The color converter preserves that original value, then lowers OKLCH chroma for the screen preview and HEX output. The warning explains why the two are not exact matches.

A vivid color sits outside an sRGB boundary while a nearby mapped swatch appears inside it.

Watch alpha across formats

A four or eight digit HEX can carry transparency. The checkerboard swatch exposes it, and CSS formats keep alpha in their output; the CMYK estimate has no alpha channel.

A translucent swatch over a checkerboard appears beside HEX with an alpha pair and several format rows.

Avoid three common conversion mistakes

01

Check the source format

Short and full HEX, rgb(), hsl(), hsv(), cmyk(), lab() and oklch() are accepted. A malformed component leaves the previous swatch visible but disables copying stale results.

02

Read alpha and gamut together

The alpha slider is separate from color channels. When a wide gamut Lab or OKLCH value is entered, compare its original text with the mapped screen HEX.

03

Copy only a current result

Automatic conversion waits 350 ms after an edit. Turn it off for manual work and press Ctrl/Cmd+Enter; a changed input disables every copy action until conversion succeeds.

Seven views of one color

Screen and CSS formats

HEX, RGB and HSL report the mapped sRGB color with CSS syntax. HSV reports the same screen color using the value axis familiar from design tools.

Perceptual coordinates

CSS Lab uses a D50 reference white; OKLCH uses D65. Their values remain separate from the sRGB preview when an input lies outside gamut.

Print estimate with a visible caveat

CMYK is derived from sRGB channel arithmetic. It helps compare notation, but an actual press needs paper, ink and an ICC profile.

Read the limits before reuse

A mapped screen color is an approximation
Out of gamut Lab or OKLCH has no exact HEX equivalent. This page reduces OKLCH chroma for the sRGB preview and marks the mapped result.
CMYK is not a print proof
There is no printer profile or black generation setting. The four percentages are a device independent estimate, not press ready separations.
HSV and CMYK are tool notation
hsv() and cmyk() are accepted here for calculation, but they are not promised as CSS declarations. Use the HEX, rgb(), hsl(), lab() or oklch() rows for CSS.
One color, no palette storage
The page does not extract image colors, generate palettes, calculate contrast scores, store colors or place them in a share URL.

Color converter questions

How do I convert a hex code to RGB?

Paste a HEX value; the RGB row shows each 0–255 channel. Short HEX expands each nibble first.

Is hex the same as RGB?

For an sRGB color, HEX and RGB encode the same channels; only the notation differs. Alpha can be added in either supported CSS form.

Can hex codes have alpha or transparency?

Yes. Four or eight digit HEX includes an alpha component; the alpha slider also adjusts the CSS outputs and checkerboard preview.

What does out of gamut mean?

It means a Lab or OKLCH color cannot be represented exactly by sRGB. The preview uses lower chroma, while the original input remains visible.

Can CMYK converted from RGB be used for print?

No. A CMYK number without a press ICC profile is only an estimate; use the print provider’s profile for production.

Have another color question?

Try the color converter

Enter a color and inspect the sRGB note before copying a CSS value.