RGB vs CMYK: Why Your Colors Look Different in Print
RGB vs CMYK explained: why screen colors shift in print, what gamut means, why quick RGB to CMYK formulas are only estimates, and a print-safe color workflow.
Read GuideDeveloper
Paste a HEX, RGB, HSL, or CSS color name and convert it to every other color format.
Developer
Paste a color in whatever format you have and this color code converter returns every other format at once: HEX, RGB, HSL, HSV, CMYK, a CSS custom property and the nearest named color. It is built for the moment when a brand guide, a design file and a codebase all describe colors differently. Instead of running separate one-way converters, you get one consistent set of values to copy into CSS, design tools or documentation. It reads HEX, rgb(), hsl() or plain CSS names like steelblue.
Converting back and forth between formats can introduce small rounding drift, because HSL and CMYK are usually shown as rounded whole percentages while HEX and RGB store exact whole numbers from 0 to 255. Pick one format as the source of truth for your design tokens, usually HEX or RGB, and always derive the other formats from it instead of converting an already converted value a second time.
FAQ
Divide R, G and B by 255 and find the largest (max) and smallest (min) of the three. Lightness is (max + min) / 2; if max equals min the color is a gray with 0% saturation, otherwise saturation is (max - min) / (1 - |2L - 1|). Hue is an angle based on which channel is largest, counting from 0 degrees for red, 120 for green and 240 for blue. The converter does all of this instantly.
First turn the HEX code into RGB and divide each channel by 255. Black (K) is 1 minus the largest of those values, and each of C, M and Y is (1 - channel - K) / (1 - K). Pure red #FF0000, for example, becomes C 0%, M 100%, Y 100%, K 0%. Treat the result as a starting point, since real print output depends on the printer's color profile.
Yes. HEX and RGB are two notations for the same sRGB color: HEX writes each of the red, green and blue channels as a two-digit base-16 number, while rgb() writes them as decimals from 0 to 255. #FFA500 and rgb(255, 165, 0) are the same orange, and browsers render them identically.
All modern browsers understand HEX, rgb() and hsl(), so the choice is about convenience. HEX is compact and common in design handoff, while hsl() is the easiest to adjust by hand because you can change lightness or saturation without touching the hue. Many teams store tokens in HEX and switch to hsl() when building lighter or darker variations.
Learn more
RGB vs CMYK explained: why screen colors shift in print, what gamut means, why quick RGB to CMYK formulas are only estimates, and a print-safe color workflow.
Read GuideUnderstand what HEX, RGB, HSL, HSV, and CMYK color codes actually mean, when to use each, and how to convert between them with confidence.
Read GuideLearn how to convert HEX to RGB and back by hand with worked examples, the RGB to HEX formula, shorthand and 8-digit codes, plus copy-ready JavaScript.
Read Guide