ForHosting KIT · Images

Hex to CMYK converter

Get the process-ink mix behind a screen color: #3498db becomes cyan 76%, magenta 31%, yellow 0% and key 14%, worked out with the standard subtractive formula. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Hex
#3498db
You get
Hex raw
#3498db
Hex6
3498db
Resistance (Ω)
52
G
152

A hex to CMYK converter takes a screen color written as a hexadecimal code—three or six digits, with or without a leading hash—and maps it into the four process-ink percentages printers and packaging proofs still speak: cyan, magenta, yellow, and key (black), each from zero through one hundred percent. Paste #3498db or the short form #abc; the tool expands shorthand when needed, normalizes to a lowercase six-digit hex, derives the red green and blue channels, then applies the standard subtractive RGB-to-CMYK formula used for quick print previews and design handoffs.

What hex and CMYK mean and how the conversion works

Hexadecimal color codes pack three eight-bit channels into a compact string that stylesheets, design tools, and brand guidelines have used for decades. In the six-digit form #RRGGBB, the first two characters encode red, the middle two encode green, and the last two encode blue, each pair interpreted as a base-sixteen integer from zero through two hundred fifty-five. The three-digit shorthand #RGB doubles each digit so #abc becomes #aabbcc—the same expansion CSS applies when you write short hex in a stylesheet.

CMYK is a subtractive ink model: cyan, magenta, and yellow remove light from white paper, while key (black) deepens shadows and saves ink on dark neutrals. This converter first expands and parses the hex into integer RGB channels, scales them to unit range by dividing by two hundred fifty-five, then computes K as one minus the maximum of those three unit channels. When K is effectively one, pure black is returned as zero cyan magenta yellow and one hundred percent key.

Otherwise each of C, M, and Y is (one minus the channel minus K) divided by (one minus K), multiplied by one hundred, and rounded to the nearest integer percent. That closed form matches the textbook device-independent preview used across free online hex-to-cmyk tools; it is not an ICC press profile, so production shops may still refine the numbers with their RIP and paper stock.

Practical tips, limits, and related searches

Prefer sending the hex string your design tool exported, including the hash if you have it; both forms work, and the response always normalizes to lowercase six-digit hex so downstream diffs stay stable. Treat the CMYK values as a quick print preview, not as a guarantee of press output: different paper, ink limits, and ICC profiles will shift appearance even when the percentages match this calculator.

Do not pass alpha forms such as #RRGGBBAA or #RGBA—this landing is intentionally limited to classic opaque RGB packing, and those lengths are rejected so you notice rather than silently dropping alpha. Named CSS colors like rebeccapurple are out of scope; resolve them to hex first or use a broader multi-space tool when you need HSL, LAB, or batch conversion.

Prefer this capability when you already have a hex token and only need CMYK ink percentages or a cmyk() string; if your pipeline starts from separate RGB integers, use the dedicated RGB-to-CMYK path instead.

Brand hex to print-ready ink percentages

Designers paste brand hex codes from Figma or a style guide and receive cyan, magenta, yellow, and key percentages for packaging mockups and print quotes.

Style-guide and handoff documentation

Convert web hex tokens into CMYK strings for PDF style guides, vendor briefs, and merchandising color chips without opening a desktop color studio.

What hex formats does the hex to CMYK converter accept?

Three-digit (#RGB) and six-digit (#RRGGBB) hexadecimal colors, with or without a leading #. Letters may be upper or lower case. Alpha forms and named CSS colors are not accepted.

How is three-digit shorthand expanded before CMYK conversion?

Each digit is doubled: #abc becomes #aabbcc, then each pair is parsed as a base-16 RGB channel from 0 to 255 and converted with the standard RGB-to-CMYK formula.

What do cyan, magenta, yellow, and key represent?

Process-ink intensities as integer percentages from 0 through 100.

Is the hex to CMYK converter free?

The browser tool is free and runs locally.

What CMYK values does #3498db give?

It gives cyan 76%, magenta 31%, yellow 0% and key 14%, written as cmyk(76%, 31%, 0%, 14%). The color is first read as red 52, green 152 and blue 219.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/color/hex-cmyk

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/color/hex-cmyk \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hex":"#3498db"}'
{
  "hex": "#3498db"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "color.hex_cmyk",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Invalid codes—wrong length, non-hex characters, empty input, or a programming 0x prefix—fail with a clear invalid_input error instead of inventing ink loads.

How to call the API and what comes back

Valid examples include #3498db, 3498db, #ABC, and abc; surrounding whitespace is trimmed, letters may be upper or lower case, and the hash is optional. Send a JSON body with one required string field named hex—aliases color, value, text, input, and code are accepted by the same solver. On success the response returns hex as a normalized lowercase #rrggbb string, hex6 without the hash, integer RGB fields r g b plus red green blue aliases and an rgb array, a css rgb() string, integer cyan magenta yellow and key percentages with black and c m y k aliases, a cmyk array of four numbers, a cmyk_css string of the form cmyk(C%, M%, Y%, K%), booleans shorthand and had_hash describing the original form, a short English message, and a steps array that shows each parse and conversion line for debugging or teaching. Failed validation—missing field, empty string after the hash, length other than three or six, non-hex characters, spaces inside the body, a 0x programming prefix, or a bare number instead of a string—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item.

Practical tips, limits, and related searches

Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts and form validation cheap while learners paste imperfect clipboard values.

Unit tests for palette and print fixtures

Generate known-good CMYK percentage tuples from hex fixtures so visual regression and print-preview tests assert stable ink values.

What happens on an invalid hex code?

The API returns invalid_input with a message describing the problem (empty input, wrong length, non-hex characters, 0x prefix, and so on). Failed validation is not charged.

Read the full KIT documentation →