Feb 8, '25 02:00

How to convert CMYK to RGB?

CMYK and RGB are two different color models used for printing and digital displays, respectively. If you are working with design or web development, you may need to convert colors from CMYK to RGB. What are CMYK and RGB? CMYK (Cyan, Magenta, Yellow, Black) ...

Read post
Share
🔥 More posts
This content has been automatically translated from Ukrainian.

CMYK and RGB are two different color models used for printing and digital displays, respectively. If you are working with design or web development, you may need to convert colors from CMYK to RGB.

What are CMYK and RGB?

  • CMYK (Cyan, Magenta, Yellow, Black) is a subtractive color model used in printers. The more ink is added, the darker the color becomes.
  • RGB (Red, Green, Blue) is an additive model used on screens. The more light is added, the brighter the colors.

Formula for converting CMYK → RGB

To convert CMYK to RGB, use the following formula:

  1. Determine the color values in the range from 0 to 1 (divide percentages by 100).
  2. Calculate the RGB values using the formula:
R = 255 × (1 - C) × (1 - K)
G = 255 × (1 - M) × (1 - K)
B = 255 × (1 - Y) × (1 - K)

Example code in JavaScript

function cmykToRgb(c, m, y, k) {
  let r = Math.round(255 * (1 - c) * (1 - k));
  let g = Math.round(255 * (1 - m) * (1 - k));
  let b = Math.round(255 * (1 - y) * (1 - k));
  return `rgb(${r}, ${g}, ${b})`;
}

console.log(cmykToRgb(0.2, 0.5, 0.0, 0.1)); // rgb(204, 115, 230)

Conversion tools

If you don't want to calculate manually, use our online converter CMYK to RGB.

Converting CMYK to RGB is necessary for accurate color display on screens. Always check the results after conversion to ensure color accuracy in your design. We also have a post on how to convert RGB to CMYK.

🔥 More posts

All posts
Feb 6, '25 02:00

How to convert RGB to HEX?

Colors in RGB format are used in CSS, graphic design, and programming. But sometimes you need to convert them to HEX. We have already written about how to convert HEX to RGB. No...

Feb 7, '25 02:00

What is HTML?

HTML (HyperText Markup Language) – is a markup language used to create web pages. It defines the struc...

Feb 7, '25 02:00

How to convert HWB to RGB?

Colors in HWB format are not often used in web design and programming. But sometimes it's necessary to...

Feb 7, '25 02:00

How to convert RGB to HWB?

If you need to convert RGB to HWB, you can use a formula that allows you to obtain hue (H), whiteness ...

Feb 8, '25 02:00

How to convert RGB to CMYK?

RGB and CMYK are two main color models used for digital displays and printing, respectively. If you ar...