RGB, HEX & CMYK Color Picker & Converter
Pick a format, enter a color, and see it instantly converted to the other two — plus a live swatch, a screen color picker, and the closest named color. Runs entirely in your browser, nothing is uploaded.
Convert a color
Common conversions:
Samples any pixel on your screen, not just this page — Chrome or Edge only. Works as an RGB color picker or a HEX color picker, whichever format you need.
| HEX | |
| RGB | |
| CMYK |
How this is calculated
Convert HEX to RGB
Each pair of hex digits (00-FF) is one channel, converted from base-16 to a 0-255 decimal value —
#FF2D95 is R=255, G=45, B=149.
Convert RGB to HEX
The reverse of the above: each 0-255 decimal channel is converted to a 2-digit base-16 (hex) value and
the three pairs are joined with a # prefix.
Convert RGB to CMYK, and CMYK to RGB
CMYK is a subtractive model used for print, so it's derived from RGB rather than entered directly by a
camera or screen. Black (K) is set to 1 − max(R,G,B) (as a 0-1 fraction), then cyan,
magenta, and yellow each measure how much of that channel is "missing" relative to the black already
removed — this is the RGB to CMYK direction. Converting CMYK to RGB
(and likewise CMYK to HEX, which just runs the HEX step afterward) runs the same formula
in reverse: R = 255 × (1−C) × (1−K), and likewise for G (using M) and
B (using Y).
Worked examples
| #FF2D95 (hex) | RGB 255, 45, 149 |
| RGB 255, 45, 149 | CMYK 0%, 82.4%, 41.6%, 0% |
| CMYK 0, 82, 41, 0 | RGB 255, 46, 150 |
| #000000 (hex) | CMYK 0%, 0%, 0%, 100% |
| RGB 0, 255, 255 | Closest named color: Aqua / Cyan |
Note the small rounding drift between RGB → CMYK → RGB above (149 becomes 150): CMYK's percentages are rounded to one decimal place for readability, so converting back and forth can shift a channel by a point or two. This is normal and matches how print software rounds too.
Frequently asked questions
What is a hex color code?
A hex color is a 6-digit base-16 code (optionally shortened to 3 digits) that represents a color as three
channels — red, green, and blue — each from 00 to FF. It's the
format used for colors in HTML, CSS, and most design software, since it's compact and unambiguous
compared to writing out three separate RGB numbers.
Why does my printed color look different from the RGB on screen?
RGB describes light (screens add red, green, and blue light together), while CMYK describes ink (a printer subtracts light by layering cyan, magenta, yellow, and black on white paper). The two models can't represent every color identically — some bright screen colors, especially saturated blues and greens, simply can't be reproduced with CMYK ink, so a print will look slightly duller even with an accurate conversion.
Is there only one correct CMYK value for a given RGB color?
No — this tool uses the common "naive" conversion formula, but real print production uses ICC color profiles specific to the printer, ink, and paper, which can shift the result. Use this tool to get a close, reasonable CMYK approximation for design work; for critical print jobs, ask your print shop for their color profile.
What's the difference between 3-digit and 6-digit hex codes?
A 3-digit hex code (like #F2D) is shorthand where each digit is doubled to make the full 6-digit
code (#FF22DD) — it can only represent 16 shades per channel instead of 256, so it covers a
smaller set of colors. This tool accepts both.
How is the "closest named color" chosen?
It compares your color's RGB values against the standard CSS named color list and picks whichever one is nearest in 3D RGB distance. It's a naming aid, not an exact match — unless your color's hex code exactly equals a named color's hex code, it's an approximation.
Does K=100% always mean pure black?
In this simple conversion, yes — K=100% with C=M=Y=0% produces RGB 0,0,0. In professional printing, designers often use a "rich black" (adding some C/M/Y to the 100% K) instead, because pure K-only black can look slightly gray on some printers. That's a print-production choice this basic converter doesn't model.
Can I pick a color from anywhere on my screen, not just this page?
Yes, using the "Pick color from screen" button above — it uses your browser's built-in eyedropper, which can sample any pixel on your entire screen, including other windows and applications, not just this page. This is a Chrome and Edge feature (the EyeDropper web API); it isn't yet available in Firefox or Safari, so the button is disabled there.