⚡FreeFastCalculatorAll calculators

Color Converter: HEX, RGB & CMYK

Convert HEX and RGB exactly, preview approximate CMYK colors, copy CSS values and convert a batch of HEX colors. Includes formulas and limitations.

Updated · Written and fact-checked by the FreeFast editorial team · Free, no sign-up

HEX#E8590C
RGB232, 89, 12
Approximate CMYK (%)0, 61.64, 94.83, 9.02

HEX and RGB represent the same 8-bit sRGB channels. CMYK uses the W3C’s approximate fallback conversion, without an ICC printer profile; a screen swatch cannot predict a printed result.

Convert HEX to RGB, RGB to HEX, or CMYK to an approximate HEX/RGB screen color. Paste a three- or six-digit HEX value, enter RGB channels, or enter four CMYK percentages. The converter shows a labeled swatch and lets you copy either the HEX value or CSS RGB notation.

How to convert a color

  1. Select HEX, RGB or CMYK as the input mode.
  2. For HEX, enter #RGB or #RRGGBB. The leading # is optional.
  3. For RGB, enter whole channel values from 0 to 255.
  4. For CMYK, enter cyan, magenta, yellow and black as percentages from 0 to 100.
  5. Read the numerical result and preview; use the copy buttons for your stylesheet or design notes.
  6. For several HEX colors, paste one per line in the batch field. Invalid rows are labeled individually.

HEX to RGB is a change of notation

The W3C CSS Color specification defines HEX and RGB notation for sRGB channels. A six-digit HEX value has pairs for red, green and blue. Convert each hexadecimal pair into its integer value to get RGB. A three-digit value expands by repeating each digit: #F80 becomes #FF8800, which is RGB 255, 136, 0.

RGB-to-HEX performs the reverse operation: encode each 8-bit channel in hexadecimal, pad it to two digits and join the three pairs. The converter uses uppercase output for readability; capitalization does not change the color. There is no color-profile transformation between these two representations.

CMYK to HEX formula

The CMYK mode uses the approximate fallback algorithm from W3C CSS Color 5 working draft. Divide percentage inputs by 100, then compute R = 255 × (1 − C) × (1 − K), G = 255 × (1 − M) × (1 − K), and B = 255 × (1 − Y) × (1 − K). Round the channels to whole integers before encoding HEX.

For C = 0%, M = 50%, Y = 100% and K = 0%, the rounded RGB result is 255, 128, 0 and the HEX result is #FF8000. These are the same screen-color output expressed in two notations.

Common color conversions

HEXRGBApproximate CMYK %
#FF0000255, 0, 00, 100, 100, 0
#00FF000, 255, 0100, 0, 100, 0
#0000FF0, 0, 255100, 100, 0, 0
#FFFFFF255, 255, 2550, 0, 0, 0
#0000000, 0, 00, 0, 0, 100

Why CMYK conversion is approximate

CMYK describes ink amounts for a printing process. RGB describes screen channels. A precise print conversion depends on the intended printer, inks, paper and color profile. The fallback formula does not include an ICC profile or the physical behavior of those materials, so a screen preview cannot guarantee the appearance of a print.

Use this mode for a quick numerical estimate or to understand channel relationships. For production artwork, use the profile and export settings supplied by the printer. HEX values alone do not contain enough information to define a printing condition.

RGB to CMYK and the black special case

The displayed approximate CMYK value chooses K = 1 − max(R,G,B) after normalizing RGB to 0–1. The other channels are derived as C = (1 − R − K)/(1 − K), with the same expression for magenta and yellow. For pure black, the denominator would be zero, so the converter returns C = M = Y = 0 and K = 100%.

This is one mathematical decomposition, not a printer’s prescribed ink separation. Different CMYK combinations can produce the same fallback RGB. Converting CMYK to RGB and back therefore does not necessarily restore the original ink percentages, even before rounding.

Input limits and CSS output

The tool accepts opaque three- and six-digit HEX values. Four- or eight-digit alpha HEX, named colors, percentage RGB and other CSS color spaces are outside this input mode. They are labeled invalid instead of being guessed or silently truncated.

The swatch is accompanied by text so the result remains understandable without relying on color alone. Use rgb(R G B) output where modern CSS RGB syntax is appropriate. Batch conversion keeps each input separate and shows the first 100 rows so the page stays responsive.

For other notation and measurement tasks, explore the conversion calculators or use the decimal feet converter for physical dimensions in a design brief.

Frequently asked questions

Is HEX to RGB exact?

For the supported opaque 8-bit sRGB values, yes. It changes the notation of the same three channels.

Is CMYK to HEX exact?

No. This tool uses an approximate profile-free screen conversion. A print-accurate conversion needs the intended color profile and printing condition.

Can I enter a three-digit HEX color?

Yes. Each digit is doubled, so #F80 expands to #FF8800.

Why does RGB black return 100% K?

The mathematical reverse conversion needs a special case to avoid division by zero. Pure black is returned as 0% C/M/Y and 100% K.

Can I convert several HEX colors at once?

Yes. Paste one color per line in the batch field. The tool identifies invalid inputs and displays up to 100 rows.

Does this support transparent HEX colors?

This version supports opaque 3- and 6-digit HEX values only. Alpha values are rejected rather than silently discarded.

Sources & method

Results are estimates for general information. Found an error? It helps everyone — see our methodology.

Related calculators