# CMY and CMYK

Unlike RGB, the CMY color model makes use of subtractive color mixing with the primaries cyan, magenta, and yellow, rather than additive color mixing. Subtractive mixing may be familiar to most from painting with watercolors. Furthermore, pigments for the colors cyan, magenta, and yellow are commonly used in printers. The CMY cube, which is equivalent to the flipped RGB cube, is shown in the figure below. The CMY cube.
Click and drag to rotate, scroll to zoom. On a touch screen, drag to rotate around the y-axis and use two fingers to zoom or to rotate around the x-axis.
Recommended exercises for this section:
• Color matching:
• Color selection:

## Conversion

In principle, converting colors from RGB to CMY and back is simple. In the RGB model, cyan can be obtained from a mixture of only green and blue, which means when used as a filter or pigment, cyan absorbs red light. Similarly, magenta absorbs green and yellow absorbs blue light. Using this information, the conversion between an RGB color $$(r,g,b)_\text{RGB}$$ and the corresponding CMY color $$(c,m,y)_\text{CMY}$$ works by starting with white and subtracting the color in the opposite representation [BB09b, p. 223]:

\begin{equation} \left( \begin{matrix} c \\ m \\ y \end{matrix} \right) = \left( \begin{matrix} 1 \\ 1 \\ 1 \end{matrix} \right) - \left( \begin{matrix} r \\ g \\ b \end{matrix} \right) \label{eq:rgbtocmy} \end{equation}
\begin{equation} \left( \begin{matrix} r \\ g \\ b \end{matrix} \right) = \left( \begin{matrix} 1 \\ 1 \\ 1 \end{matrix} \right) - \left( \begin{matrix} c \\ m \\ y \end{matrix} \right) \label{eq:cmytorgb} \end{equation}

However, there is a problem with this method when used in practice. According to Equation \ref{eq:rgbtocmy}, black is the mixture of 100% cyan, magenta, and yellow. As can also be experienced with watercolors though, cleaning a brush in a glass of water after painting with different colors more easily turns the water into a brown hue than actual black. The common solution for this problem is to introduce a fourth, black channel K. Another problem is the fact that CMYK and color models like RGB are designed for different kinds of devices which often operate with different gamuts. Conversion to CMYK is nontrivial and device-dependent [HSF06, p. 159][BB09b, p. 224]. This page will only cover the straight-forward method for converting CMY colors $$(c,m,y)_\text{CMY}$$ to CMYK colors $$(c',m',y',k)_\text{CMYK}$$:

\begin{equation} \left( \begin{matrix} c' \\ m' \\ y' \\ k \end{matrix} \right) = \left( \begin{matrix} c-k \\ m-k \\ y-k \\ k \end{matrix} \right) \label{eq:cmytocmyk}, \end{equation}
where $$k=\min\left\lbrace c,m,y \right\rbrace$$ [BB09b, p. 223]. Because of the introduction of the K channel, less intensity is needed in the other three channels. This is accounted for by the subtraction of $$k$$ from the original CMY color in Equation \ref{eq:cmytocmyk}.

A comparison of RGB and CMY is shown in the figure below. Comparison of the RGB and CMY cubes.
Recommended exercises for this section:
• Conversion selection:
• Conversion:

## Literature

[BB09b]
Burger, Wilhelm; Burge, Mark J.: Principles of Digital Image Processing: Fundamental Techniques. Undergraduate Topics in Computer Science. Springer-Verlag London, 1st edition, 2009.
[HSF06]
Hrehorova, Erika; Sharma, Abhay; Fleming, PD: Color reproduction studies in RGB and CMYK workflows using inkjet printer drivers and RIPs. In: Proc. 58th TAGA Annual Technical Conference, Vancouver, British Columbia. Citeseer, pp. 159–171, 2006.