CMYK colour space

By Martin McBride, 2021-04-28
Tags: colour cmyk
Categories: computer science colour

When we print an image, we normally apply different coloured inks to white paper to create the colours we require.

A printed page works quite differently to a computer screen. A screen starts is dark by default, and adds red, green and blue light to create colours. A printed page doesn't generate light, it simply reflects light. A blank page starts off white (assuming it is white paper viewed under white light), and the ink on the page absorbs different amounts of red, green and blue light, to leave the required colour. We call this a subtractive model.

Many printing processes work by adding several layers of different coloured translucent inks. Here is an illustration:

Because the ink is translucent, light passes through the ink, and reflects off the white paper underneath. The ink acts as a colour filter, removing certain colours.

We normally use cyan, magenta and yellow ink. Cyan ink filters out red light, leaving just green and blue (cyan is a mixture of green and blue, so when we remove the red from white light, we are left with cyan light). Magenta ink filters out green light (magenta is a mixture of red and blue). Yellow ink filters out blue light (yellow is a mixture of red and green).

If we put one layer of ink on top of another, light passes through both layers and reflects off the page. For example:

In this case, magenta ink has been layered over cyan ink. The cyan ink removes the red light, the magenta ink removes the green light, so we end up with a blue colour in the page. In fact, by layering different amounts of cyan, magenta and yellow ink on the page, it is possible to remove different amounts of red, green and blue from the reflected light, which allows you to print any colour.

The K component

If you own a colour inkjet printer or similar, you will probably know that it has 4 colours, cyan, magenta, yellow and black. The K part of CMYK stands for Key, which is an old printing term for the black plate in a traditional printing press.

In theory, we shouldn't need a separate black ink, because mixing cyan, magenta and yellow ink together should create black. But in reality, there are several advantages to using black ink:

  • Equal quantities of cyan, magenta an yellow ink don't actually create a perfect black. They usually create a very dark brown.
  • In most print processes, the three colours don't exactly align on the page. This effect is most pronounced if you print small black features (such as text), and makes the feature appear blurred or fuzzy.

Many colour printing processes - from documents that people might print on a home or office printer, through to newspapers or magazines - often feature significant amounts of black text. CMY printing generally doesn't create black text of suitable quality, so the best solution is usually to add separate black colour specifically for text and other 100% black features.

Black ink is also considerably cheaper to produce than coloured ink.

See also

If you found this article useful, you might be interested in the book NumPy Recipes or other books by the same author.

Join the PythonInformer Newsletter

Sign up using this form to receive an email when new content is added:

Popular tags

2d arrays abstract data type alignment and angle animation arc array arrays bar chart bar style behavioural pattern bezier curve built-in function callable object chain circle classes clipping close closure cmyk colour combinations comparison operator comprehension context context manager conversion count creational pattern data science data types decorator design pattern device space dictionary drawing duck typing efficiency ellipse else encryption enumerate fill filter font font style for loop formula function function composition function plot functools game development generativepy tutorial generator geometry gif global variable gradient greyscale higher order function hsl html image image processing imagesurface immutable object in operator index inner function input installing iter iterable iterator itertools join l system lambda function latex len lerp line line plot line style linear gradient linspace list list comprehension logical operator lru_cache magic method mandelbrot mandelbrot set map marker style matplotlib monad mutability named parameter numeric python numpy object open operator optimisation optional parameter or pandas partial application path pattern permutations pie chart pil pillow polygon pong positional parameter print product programming paradigms programming techniques pure function python standard library radial gradient range recipes rectangle recursion reduce regular polygon repeat rgb rotation roundrect scaling scatter plot scipy sector segment sequence setup shape singleton slice slicing sound spirograph sprite square str stream string stroke structural pattern subpath symmetric encryption template tex text text metrics tinkerbell fractal transform translation transparency triangle truthy value tuple turtle unpacking user space vectorisation webserver website while loop zip zip_longest