HEX to RGB Converter
Use HEX to RGB Converter to choose and convert color precisely — instant and free.
Pick a color by eye or by hex code, and read it back as HEX, RGB, HSL and CMYK — all at once, all in your browser.
Your browser is preparing the tool. It runs 100% locally.
Pick a color — visually with the swatch, or by typing a hex code — and the tool reads it back in five formats at once: HEX, RGB, the CSS rgb() string, HSL and CMYK. The swatch is your browser's native color control, the same one your operating system shows, and every other value is computed on your device. Click any code to copy it.
Drag the swatch or type a hex code, and the two stay in sync — change one and the other follows. From that single color the tool shows five readouts: HEX, the three RGB channels, the ready-to-paste CSS rgb() string, HSL, and a CMYK approximation. It opens on a blue (#2563EB) so there's always something to read, and each code is click-to-copy.
The point is having every format in front of you at once. CSS usually wants hex or HSL, a canvas or image library wants the raw 0–255 numbers, and a print hand-off wants CMYK — so instead of pinging between four converters, you pick once and grab whichever notation the next tool expects.
The swatch is the browser's native color input — the same OS color dialog applications use. By specification it always hands back a six-digit hex in lowercase, with no transparency channel, so that hex is the single source of truth for everything else on the page.
From that hex the tool does the rest locally: it splits the value into red, green and blue, folds those into the HSL cylinder, and runs the straight RGB-to-CMYK approximation. Type into the hex box instead and it accepts three- or six-digit input, adds the # for you, and repaints the swatch. Nothing is uploaded; the math runs as you click or type.
There's no color database and no network request. The picker reads one sRGB color from your browser's native color control (or the hex you type) and derives every other format from it in the page, using the conversions defined by the CSS Color and sRGB specifications.
| Input | Native color swatch + hex field (3 or 6 digit) |
|---|---|
| Output formats | HEX, RGB, rgb(), HSL, CMYK |
| Color space | sRGB, 8-bit, 0–255 per channel |
| Total colors | 16,777,216 (256 × 256 × 256) |
| Alpha / opacity | Not supported — native control has none |
| CMYK | Approximate; screen reference, not print-ready |
| Copy | Click any code to copy it |
| Where it runs | Entirely in your browser |
The CMYK figure is a plain mathematical approximation, not a print-ready conversion. RGB (light) and CMYK (ink) cover different ranges of color, and what actually prints depends on the press, the ink and the paper — which is why a print shop converts through an ICC profile for a specific stock. Treat the CMYK here as a ballpark, not a spec to send to a printer.
There is no transparency. The native color control can't express alpha, so you always get a fully opaque color; for an rgba() or hsla() value you add the alpha yourself.
HSL is rounded to whole degrees and percentages, so a hex → HSL → hex round-trip can land a step or two off the original. For an exact, reversible pair use the HEX and RGB converters instead.
Everything is read as sRGB. A wide-gamut color (Display P3 and similar) is treated as ordinary sRGB numbers here, not remapped.
Grab a hex for CSS, an HSL to fine-tune, and an rgb() for a gradient stop — all from a single pick, without hopping between tools.
Read a color's rough CMYK before sending artwork out, then confirm the exact values with your printer's ICC profile.
Pull the 0–255 RGB numbers a canvas, game engine or image library expects, instead of hand-converting a hex.
Paste a hex you found somewhere, see it filled large in the swatch, and copy whatever other format you need.
For a coordinated set of colors, use the color palette generator; to check legibility, use the contrast checker; for transparency, add an alpha value to the rgb() or hsl() output yourself; for print, convert through your print provider's ICC profile.
The five codes are computed in-page from one sRGB color — and the CMYK is a screen approximation, not a print profile, so confirm print values with your printer's ICC profile.
Use HEX to RGB Converter to choose and convert color precisely — instant and free.
Use Color Palette Generator to choose and convert color precisely — instant and free.
Use Gradient Generator to choose and convert color precisely — instant and free.
Use Contrast Checker to choose and convert color precisely — instant and free.
RGB to HEX Converter with copy-ready values for design and front-end work.
HEX to HSL Converter online — accurate color values, palettes and previews in-browser.
It is free, private and runs entirely in your browser — no sign-up, no uploads, no limits.