HEX to CMYK Converter

HEX to CMYK: #0D6EFD = cmyk(95%, 57%, 0%, 1%). See the formula worked step by step, a reference table, and our test of every HEX value.

How to use HEX to CMYK

  1. 1Enter a web HEX colour.
  2. 2Read the formula CMYK percentages for each ink.
  3. 3Compare with the profile column below before sending values to a printer.

Features

  • Standard naive CMYK formula, shown step by step
  • Side-by-side with a real ICC profile conversion
  • Total ink coverage for each colour

How HEX to CMYK conversion works

HEX is a screen colour made of light; CMYK is a recipe for ink on paper. The quick formula below, which this converter and most online tools use, treats ink as the exact opposite of light. It is useful for a first estimate, but a printer converts with an ICC profile for the paper and press, and the table further down shows how far apart the two can be.

  • Decode HEX to R, G, B and divide by 255.
  • K = 1 − max(R′, G′, B′).
  • If K = 1 the colour is pure black: C = M = Y = 0.
  • C = (1 − R′ − K) ÷ (1 − K), M = (1 − G′ − K) ÷ (1 − K), Y = (1 − B′ − K) ÷ (1 − K).
  • Multiply by 100 and round: cmyk(C%, M%, Y%, K%).

Worked example: #0D6EFD to CMYK

Here is the converter's own calculation for #0D6EFD, step by step. The result, cmyk(95%, 57%, 0%, 1%), is exactly what the tool above shows for this input.

  • Split into pairs: 0D, 6E, FD.
  • Red: 0D = 0 × 16 + 13 = 13.
  • Green: 6E = 6 × 16 + 14 = 110.
  • Blue: FD = 15 × 16 + 13 = 253.
  • R′ = 13 ÷ 255 = 0.051, G′ = 0.431, B′ = 0.992.
  • K = 1 − max(R′, G′, B′) = 1 − 0.992 = 0.008.
  • C = (1 − 0.051 − 0.008) ÷ (1 − 0.008) = 0.949; M = 0.565; Y = 0.
  • Rounded to percent: cmyk(95%, 57%, 0%, 1%).

Bootstrap 5.3 theme colours in HEX and CMYK

Bootstrap's base colour variables.

ColourHEXCMYK
blue#0D6EFDcmyk(95%, 57%, 0%, 1%)
indigo#6610F2cmyk(58%, 93%, 0%, 5%)
purple#6F42C1cmyk(42%, 66%, 0%, 24%)
pink#D63384cmyk(0%, 76%, 38%, 16%)
red#DC3545cmyk(0%, 76%, 69%, 14%)
orange#FD7E14cmyk(0%, 50%, 92%, 1%)
yellow#FFC107cmyk(0%, 24%, 97%, 0%)
green#198754cmyk(81%, 0%, 38%, 47%)
teal#20C997cmyk(84%, 0%, 25%, 21%)
cyan#0DCAF0cmyk(95%, 16%, 0%, 6%)
gray-600#6C757Dcmyk(14%, 6%, 0%, 51%)
gray-900#212529cmyk(20%, 10%, 0%, 84%)

Source: Bootstrap 5.3 _variables.scss

Precision test: every HEX value through the converter

Inside the formula, whole-number CMYK is a coarse grid over HEX: all 16,777,216 codes collapse into 2,463,617 CMYK values and only 12.735% come back exactly, never more than 2 levels off. That rounding is tiny compared with the gap between the formula and a real print profile.

Method: every whole-number HEX value, through the converter's own code and back, compared on the 0–255 scale (how we test).

MeasureResult
HEX values tested16,777,216
Distinct CMYK results2,463,617
Came back exactly12.735%
Largest change (0–255 levels)2
Average change0.9311

Last updated · Source: Pixohub exhaustive test of lib/color-math.ts

Formula vs a real print profile

Bootstrap's primary blue is a good warning: the formula asks for 95/57/0/1, while the ICC profile asks for 73/45/0/0, because a fully saturated screen blue is outside what CMYK inks can print and the profile maps it to the nearest printable blue. Across these 12 colours the formula's ink values differed from the profile's by up to 64 percentage points on a single ink.

The converter above uses the standard formula. To show what a colour-managed conversion does, we converted the same colours with LittleCMS 2.19 through the Generic CMYK profile that ships with macOS (relative colorimetric intent with black point compensation, the default in Photoshop). Your printer's profile will give different numbers again, but in the same direction.

ColourHEXFormula C/M/Y/KProfile C/M/Y/KProfile total ink
blue#0D6EFD95/57/0/173/45/0/0118%
indigo#6610F258/93/0/576/66/0/0142%
purple#6F42C142/66/0/2473/68/0/0141%
pink#D633840/76/38/166/88/6/2102%
red#DC35450/76/69/141/91/69/2163%
orange#FD7E140/50/92/10/55/85/0140%
yellow#FFC1070/24/97/00/22/91/0113%
green#19875481/0/38/4782/13/80/11186%
teal#20C99784/0/25/2159/0/46/0105%
cyan#0DCAF095/16/0/658/1/2/061%
gray-600#6C757D14/6/0/5160/46/37/4147%
gray-900#21252920/10/0/8482/73/64/50269%

Last updated · Source: Pixohub test, macOS Generic CMYK Profile via LittleCMS

Where you'll use HEX to CMYK

Briefing a printer with a web brand colour

Give the printer the HEX and let them convert with their profile, or ask for a proof. If you must supply CMYK, use values from a profile-based conversion (Photoshop, Affinity or InDesign with the printer's profile), not from a formula.

Quick estimates for drafts

For a home or office printer draft, the formula is fine: those printers take RGB anyway and convert internally. The CMYK numbers help you guess whether a colour will print dull.

Checking whether a colour is printable

Very saturated blues, greens and oranges from the web often fall outside the CMYK gamut. If the profile column below looks noticeably different from the formula, expect the printed colour to look duller than on screen.

Common mistakes

  • Sending formula CMYK to a commercial printer as final values: real presses convert through an ICC profile (for example FOGRA39 in Europe or GRACoL in the US), and the numbers differ.
  • Expecting black text from #000000 to print as 100% K: through a profile it becomes rich black with four inks (see the RGB to CMYK page), which can blur small text; set body text to 100% K directly in your layout app.
  • Ignoring total ink: the formula never exceeds 100% total for a pure colour, but profile conversions of dark colours can reach close to 300%, which matters for drying time on uncoated paper.
  • Expecting screen and paper to match: monitors are backlit and paper reflects light, so even a perfect conversion looks different until you view a proof under good light.

Frequently asked questions

Why do other converters give slightly different CMYK values?

Most online converters use this same naive formula, but some round differently or apply a profile. Profile-based results (Photoshop, Illustrator) differ more, as the comparison table on this page shows.

What CMYK should I give my printer for #0D6EFD?

The formula gives 95/57/0/1; macOS's Generic CMYK profile gives 73/45/0/0. Your printer's own profile will give a third answer. Send the HEX plus a target sample and ask for a proof.

Can every HEX colour be printed?

No. Screens can show saturated colours, especially bright blues and greens, that cyan, magenta, yellow and black ink can't reproduce. A profile conversion moves them to the closest printable colour.

Is K the same as black ink?

Yes. K stands for key, the plate that carries the image detail, which in four-colour printing is the black ink.

More text, code & dev tools