Gamut Bench

RGB to HEX.
And everything in between.

Paste a color. Get HEX, RGB, HSL, OKLCH and CMYK together — with contrast you can check and shades you can use.

Calculated locally. Always.
#91C5E7sRGB
Light blue
237.5° hue

Nearest CSS name: skyblue · approximate

100%

One source color. No uploads. All formats, calculated locally.

⌘ K

HEX, RGB, HSL, LCH, OKLCH or a CSS color name

hex#91C5E7
rgbrgb(145 197 231)
hslhsl(204 64% 74%)
oklchoklch(0.799 0.073 237.5)
cmyk37 15 0 9
lchlch(76.78% 25.36 243.59)
css--brand: #91C5E7;

Approximate — without an ICC profile for the press and paper this is a starting point, not a spec.

Use in workspace
Perceptually even

Eleven steps. One hue.

Built in OKLCH. Dots mark chroma reduced by more than 15% to fit sRGB.

Contrast, measured

Check text contrast.

WCAG 2.2 + APCA
Black text11.34:1AAA text

APCA 69.1 Lc · Dark on light · WCAG 3 draft
Body text, 16px and up

White text1.85:1Fails AA

APCA 39.0 Lc · Light on dark · WCAG 3 draft
Non-text elements only

Recently copied

Colors you copy appear here. Stored only on this device.

Convert up to 500 colors at once · Pro

A practical color guide

Five ways to write the same color.

Choose the notation that fits your next task. Each format describes color differently; none is the right answer for every workflow.

HEX

For interfaces and handoff

Compact, familiar and easy to paste. Individual digits do not tell you how light or saturated a color feels.

RGB

For screens and code

Red, green and blue channels match screen output. Equal numeric changes do not produce equal perceived changes.

HSL

For quick adjustments

Hue, saturation and lightness are easy to manipulate. The same lightness number can look very different across hues.

OKLCH

For consistent color systems

Perceptual lightness helps build even scales. Some combinations exceed sRGB and need reduced chroma.

CMYK

For a print starting point

Cyan, magenta, yellow and black describe ink. Without an ICC profile this is an approximation, not a press specification.

RGB to HEX, one channel at a time.

For rgb(145 197 231), divide each channel by 16. Hexadecimal uses A through F for the values 10 through 15.

145 ÷ 16 = 9 remainder 1 → 91197 ÷ 16 = 12 remainder 5 → C5231 ÷ 16 = 14 remainder 7 → E7

HEX to RGB, back again.

Reading #91C5E7 the other way, take the digit pairs and multiply the first digit by 16, then add the second. A through F stand for 10 through 15.

91 → 9 × 16 + 1 = 145C5 → 12 × 16 + 5 = 197E7 → 14 × 16 + 7 = 231

The result is rgb(145 197 231) — the same color, written for a different job. HEX and RGB address identical sRGB channels, so this round trip is exact. HSL, OKLCH and CMYK are displayed rounded, and copying those back can shift the last digit.

Convert OKLCH to HEX for sRGB output

Paste an oklch() value into the color input and copy the HEX result. Some OKLCH colors are outside sRGB, which is the gamut used by HEX. In that case, the converter reduces chroma to produce a displayable result. Compare the preview before replacing a wide-gamut CSS color with HEX.

For HEX to OKLCH, paste the HEX value and read the lightness, chroma and hue in the OKLCH row. The output is rounded for copying; converting that rounded text back may slightly change the RGB channels.

Convert HSL to HEX, or RGB to HSL

Enter a CSS value such as hsl(0 100% 50%) to get #FF0000. To go from RGB to HSL, use rgb(255 0 0) in the same input and copy the HSL row. HSL and HEX describe sRGB colors using different coordinates; changing notation does not add colors outside that gamut.

Common colors, side by side.

HEXRGBHSLOKLCH
#FFFFFF255 255 2550 0% 100%1.000 0.000 0.0
#0000000 0 00 0% 0%0.000 0.000 0.0
#91C5E7145 197 231204 64% 74%0.799 0.073 237.5
#FF6347255 99 719 100% 64%0.696 0.196 32.3
#FFD700255 215 051 100% 50%0.887 0.182 95.3
#1E90FF30 144 255210 100% 56%0.652 0.190 253.2
#663399102 51 153270 50% 40%0.440 0.160 303.4
#2E8B5746 139 87146 50% 36%0.569 0.119 154.9

A few useful answers.

How do I convert RGB to HEX?

Divide each RGB channel by 16. The quotient and remainder become two hexadecimal digits. Join the red, green and blue pairs after a #.

Does converting a color change it?

HEX and RGB express the same sRGB channels. Displayed HSL and OKLCH values are rounded, so copying them back can introduce a small rounding difference.

Is CMYK accurate enough for print?

CMYK here is an approximate mathematical conversion. A production print specification needs an ICC profile for your printer, ink and paper.

Are my colors uploaded?

Color conversion runs in your browser. Inputs are not uploaded. Recently copied colors stay in local storage on this device.

What does a three-digit hex like #abc mean?

Each digit is doubled: #abc expands to #aabbcc. It is shorthand, not a different color, and only colors whose pairs repeat can be written that way.

How does an eight-digit hex work?

The last two digits are alpha. #91C5E7FF is fully opaque and #91C5E780 is about 50 percent. Divide the alpha pair by 255 to get the decimal value.