Painting a rainbow with three colours: how a printer does it (in association with HP)

There are some things computing devices can do that seem a bit miraculous when you start to look into how they work. One of these is printing images in finely detailed colour. A modern inkjet printer will usually be equipped with just three primary hues, plus black, and maybe a couple of secondary colours based on the primary ones.

Painting a rainbow with three colours: how a printer does it (in association with HP)

Yet this limited set of building blocks can be used to create a nearly infinite palette of colours. A number of processes are employed to achieve this, but the main one is called dithering, and in this feature we will explain exactly how it works.

The basic process of dithering involves approximating a continuous gradient of colour using the presence or absence of colour with a single intensity. For a monochromatic dithering, the dots are either white or black. For colour dithering, the dots will be the primary colours available, blended in the appropriate proportion for the intended shade. Clever placement of the dots imitate the colour density of the continuous image.

The human eye will still see the continuously coloured image even if the dots are visible, because the brain is wired to fill in the gaps, in the same way as we perceive continuous motion from a film made up of 24 still frames per second, or from a TV picture that is only refreshed every 25th of a second.With modern prints you’ll need to look closely to spot the effects of dithering, if it’s visible at all.

A pixel on a colour display will only have three colour choices, red, green and blue, and these will be combined to make other colours. The colour is additive, so the light wavelengths mix to create different hues and will be white if all three primary shades are mixed at full intensity.

Printing, on the other hand, is subtractive, so the pigments absorb some wavelengths of light, and combining them means a wider range of wavelengths is absorbed. This is why printing revolves around cyan, magenta and yellow, and why black will be created if all three are mixed together at full intensity. Despite this, there is usually a fourth black cartridge to ensure black printing is as pure as possible.

cmyk_example_bg

However, with a screen each colour pixel will have multiple levels of intensity available, usually 256 for an 8-bit display. So combinations of intensity of each primary colour can give you millions of colours – 16,777,216 for an 8-bit display. Originally, a printer such as an inkjet could only place dots of ink in a binary fashion – you either had a dot or you didn’t.

However, over the last couple of decades technology has developed to vary density by layering multiple dots. In 1994, HP’s PhotoREt introduced the ability to lay down four drops of ink per dot, giving 48 colours. PhotoREt II increased this to 16, allowing 650 different colours, and by the end of 1999, PhotoREt III could produce up to 29 drops of ink at 5pl apiece, which meant it could produce over 3,500 colours per dot. The latest PhotoREt IV uses six ink colours and up to 32 dots to produce over 1.2 million different shades.

This is still some way off the 16.7 million colours of a screen, so the frequency of dots will still need to be used to mimic the full range of intensity of a primary colour, with non-primary colours derived by blending the intensities of primary colours. Dithering algorithms in the printer raster image processor (RIP) software calculate the number and arrangement of dots that will be required to create the specified colour intensity. There are many methods used to arrange these dots, so that the subtle graduations in tone are preserved as much as possible.

patterndither

The simplest arrangement for these dots is a pattern dither, where different fixed patterns are used for each pixel value, corresponding to the 256 levels of an 8-bit colour value. A 4 x 4 or 8 x 8 matrix will generally be used, and a number of pattern options are available, including halftoning, Bayer, and void-and-cluster.

A more complex system is called Error Diffusion. In its simplest form, when a pixel can be either on or off, the difference between the true intensity value and the full on state is passed onto the next pixel as an error value, until the aggregate value is enough for a full on state. Then the process begins again. However, this system leads to a considerable loss of detail, and some unusual patterns. 

Fortunately, there are many more sophisticated flavours of error diffusion. Floyd & Steinberg is one of the oldest and most commonly used. In this system, the error described above is distributed to four neighbouring pixels instead of just one, with each one receiving a weighted proportion. This makes for a much clearer and more even dithering.

However, it has processing overhead because floating point calculations will be required. So there are numerous other dithering algorithms that sacrifice the fine quality of Floyd & Steinberg for better processing speed, such as Stucki, Burkes, and Sierra Filter Lite. The printer driver may vary between these depending on ink and paper type, or even give the user the option to choose.

ditheringoptions

Inkjets introduce further complications to the dithering process. For a start, most inkjets use multiple passes, which are often bidirectional. This can cause misalignment between rows of dots, which reduces the accuracy of the dithering pattern, and can lead to banding. The drop size can also vary for different colours, which will necessitate the use of adjusted algorithms. There will also be a reduction in quality if there are blocked nozzles.

Photo printers that have secondary, lighter versions of the primary colours can use these to provide more subtle dithering. These add light magenta and light cyan. HP’s PhotoREt IV, as mentioned above, uses six rather than four colours. However, as inkjets become able to produce smaller dots, and stack these to vary intensity as with PhotoREt, the need for the secondary shades will be reduced. The issue with multiple passes is also surmounted by HP’s PageWide technology, which prints a full-page width in a single pass.

A lot more sophistication goes into producing great-looking prints than an image on a monitor screen. An inkjet needs to employ a whole range of technologies to provide the full range of colours, and to produce smooth gradations between them across the page. But these technologies work very well indeed, allowing modern inkjets to create prints that show no signs of the clever technology that went into their production.

For more advice on transforming your business, visit HP BusinessNow

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.