RGB → HEX converter
Pack RGB channels into a HEX code
Enter red, green and blue values from 0 to 255 and get a CSS-ready hex code the moment you type — with CMYK ink percentages, HSL and a live swatch alongside it. The HEX field stays editable if you want to jump directions.
- No submit button — converts as you type
- 100% client-side — nothing is uploaded
- No ads, no account
Converter
RGB to HEX, both ways
Start from the channel values, or flip over and type a hex code. Everything stays in sync.
Enter a 3 or 6 digit hexadecimal colour, with or without the leading hash.
- HEX
- CMYK
- RGB
- HSL
Total ink coverage
131%
Within the ~300% most commercial presses accept.
CMYK here is the standard sRGB approximation — a faithful preview, not a press-calibrated match.
FAQ
Frequently asked questions
Answers to the most common questions about converting HEX to CMYK, converting CMYK to HEX, RGB, print accuracy, bulk conversion and privacy.
How does HEX convert to RGB?
A six-digit hex code is three pairs of hexadecimal digits, one pair per channel. Split #7C3AED into 7C, 3A and ED, convert each pair from base 16 to decimal, and you get R=124, G=58, B=237. Three-digit shorthand like #F00 simply doubles each digit to F00 → FF, 00, 00.
Can I go the other way?
Yes — every field in the converter is editable. Change any of C, M, Y or K and the HEX, RGB and HSL update instantly. This page starts you in the reverse direction; the HEX field stays live either way.
How do I get from RGB to CMYK?
Divide each channel by 255, take k = 1 − max(R′, G′, B′), then c = (1 − R′ − k) ÷ (1 − k), with the same for m and y. There is no direct RGB→CMYK shortcut that skips the black calculation.
What HEX formats are accepted?
Both three-digit shorthand (#F00) and the full six-digit form (#FF0000), with or without the leading hash, in upper or lower case. Anything else is rejected with an inline message rather than silently mangled.
Does this tool store or upload my colours?
No. Every conversion happens locally in your browser. Nothing you type, pick or paste is sent to a server. The only thing we keep is a short list of your recent colours in your own browser storage, which you control and can clear at any time.