### Ticker

6/recent/ticker-posts

# Color Models In Computer Graphics

#### What are the three types of color representation in color image?

Colors models and coordinates systems used for stored, displayed, and printed images.

### RGB Color Model for CRT Displays

1) We usually store color information directly in RGB form.

2) RGB coordinate system is in fact device dependent.

3) We expect to be able to use 8 bits per color channel for color that is accurate enough.

### Important Color Models for Images

Important Color Models for Images RGB Color Model CMY Color Model

### RGB Color Model

In the RGB model, each color appears in its primary spectral components of Red, green, and blue. This model is based on a Cartesian coordinate system. The color subspace is shown in figure 1.15, in which RGB primary values are at three corners; the secondary colors cyan, magenta, and yellow are at three other corners; black is at the origin; and white is at the corner farthest from the origin.

In this model, the grayscale (points of equal RGB values) extends from black to white along the line joining these two points.

Different colors in this model are points on or inside the cube, and are defined by vectors extending from the origin. For convenience, the assumption is that all color values have been normalized so that the cube shown in figure 1.15 is the unit cube. That is, all values of R, G, and B are assumed to be in the range [0, 1].

Images represented in the RGB color model consist of three component images, one for each primary color. When fed into an RGB monitor, these three images combine on the screen to produce a composite color image.

It is of interest to note that acquiring a color image is basically the process shown in figure 1.16 in reverse. A color image can be acquired by using three filters, sensitive to red, green, and blue, respectively. When we view a color scene with a monochrome camera equipped with one of these filters, the result is a monochrome image whose intensity is proportional to the response of that filter.

Repeating this process with each filter produces three monochrome images that are the RGB component images of the color scene. (In practice, RGB color image sensors usually integrate this process into a single device.) Clearly, displaying these three RGB component images in the form shown in figure 1.16 would yield an RGB color rendition of the original color scene.

### CMYK Color Model

CMYK is a scheme for combining primary pigments. The C stands for cyan (aqua), M stands for magenta (pink), Y for yellow, and K for Key., The key color in today’s printing world is black but it has not always been. During the early days of printing, the colors used for Key have been brown, blue, or black -- whichever was the cheapest ink to acquire at any given time.

The CMYK pigment model works like an “upside-down” version of the RGB (red, green, and blue) color model. Many paint and draw programs can make use of either the RGB or the CMYK model. The RGB scheme is used mainly for computer displays, while the CMYK model is used for printed color illustrations (hard copy).

There is a fundamental difference between color and pigment. Color represents energy radiated by a luminous object such as a cathode ray tube (CRT) or a light-emitting diode (LED). The primary colors are red (R), green (G), and blue(B). When you see a red area on a CRT, it looks red because it radiates a large amount of light in the red portion of the electromagnetic radiation spectrum (around 750 nanometres), and much less at another wavelength. Pigments, as opposed to colors, represent energy that is not absorbed by a substance such as ink or paint. The primary pigments are cyan (C), magenta(M) and yellow (Y). Sometimes black (K) is also considered a primary pigment, although black can be obtained by combining pure cyan, magenta and yellow in equal and large amounts. When you see yellow ink on a page, it looks yellow because it absorbs most energy at all visible wavelengths except in the yellow portion of the spectrum (around 600 nanometres), where most of the energy is reflected.

The primary pigments and the primary colors are mathematically related. Any two pure radiant primary colors (R, G, or B), when combined, produce radiation having the appearance of one of the pure non-black primary pigments (C, M, or Y). Any two pure non-black primary pigments, when mixed, produce a substance having the appearance of one of the pure primary colors. These relationships are depicted in the illustration.

The primary colors RGB, combined at 100-percent brilliance, produce white. The primary pigments CMY, combined at maximum concentration, produce black. Shades of gray result from the equal (but not maximum) brilliance of R, G, and B, or from equal (but not maximum) concentrations of C, M, and Y. If you have a paint or draw program such as Corel DRAW! that employs both the RGB and the CMYK schemes, you can investigate these relationships by filling in regions with solid colors using one mode, and examining the equivalent in the other mode. After a while you will develop an intuitive sense of how these schemes work, how they resemble each other, and how they differ. In general, the RGB mode should be used when preparing graphics intended mainly for viewing on computer displays. The CMYK mode should be used when creating illustrations for print media.

Working on photos in CMYK mode has these disadvantages:

1) CMYK images are larger than RGB (with four color values per pixel instead of three with RGB).

2) Some photo filters do not work in CMYK mode.

3) The CMYK color space usually contains fewer colors than most RGB 1 color spaces. Thus, when you convert from RGB to CMYK, you may lose some colors, and there is no way to retrieve them should you want to later use your image for something such as Light jet printing, which is used by t photo services to output your image on photographic paper, or a digital presentation using an RGB monitor.

The transformation from RGB to CMYK

The RGB to CMY transformation is defined as:

The inverse transformation is found by subtracting the C, M, Y components from one. Many printing processes use a fourth color to improve the quality of the black colors printed. The CMYK color space is the model used for the four-color printing process and uses the four-color components C Mk, Yk and K, with the fourth component K representing the additional color black.

The RGB to CMYK transformation is first computed using equation (1) to generate the CMY color components. The rest of the transformation into the CMYK space is accomplished using:

Separation Options

There is a limit to the amount of ink that can be applied on the same spot of paper without compromising quality. The ink/paper/press combination defines the maximum ink coverage, although 280-300% is considered a sale range for most applications (except newsprint, which generally tolerates no more than 240% total ink coverage).

The two Separation Type options in the Custom CMYK dialog box (Gray Component Replacement) and UCR (Undercolor Removal) methods for maintaining acceptable maximum ink coverage, while still achieving quality color:

1)         Gray Component Replacement: The three primary ink colors combine to create shades of gray. Black ink also creates shades of gray. To keep maximum Ink coverage within the allowed range, gray component replacement removes neutral CMY components and replaces them with gray:

i)                    Black Generation: This menu defines how much black is used when RGB colors are translated to CMYK. You can choose from None (no black plate is generated), Light, Medium (the default), Heavy, and Maximum. You can also choose Custom to define the curve of black generation. The curve to the right shows that no black will be replaced for colors below 20%; at 20%, the curve begins to get steeper, which means that CMY neutrals greater than 20% are affected by GCR.

ii)                  Black Ink Limit: This field defines the maximum dot of black ink that can be used in the separation.

iii)                Total Ink Limit: This field defines that total ink coverage as defined by your service provider.

iv)                UCA Amount: This field determines how much Under-Color Addition (UCA) to incorporate. When you replace the CMY component with K, you can lose density in those areas of the image. To compensate for this loss of density, you can specify a UCA amount to return some of the CMY component that was originally removed. 2)

2)         Under Color Removal: Under-color removal affects only the neutral areas of an image, or

those areas where the cyan, magenta, and yellow ink percentages are equal. The equal CMY percentages are replaced with corresponding percentage of black ink. When the UCR radio button is selected, you can only define the Black ink Limit and Total ink Limit values; the Black Generation and UCA Amount options are not available.

When creating color separations, RGB is translated into CMYK. In theory, the new colors (C, M, and Y) are combined to create the black needed in the image. In reality, however, when mixed together these colors create a muddy brown instead. Using UCR, the black ink is used to replace cyan, magenta, and yellow in areas with neutral colors like shadows, grays, and white highlights. This uses less ink and is generally used with newsprint and other types of print where dot gain is forgiven easily. More technically, UCR reduces the amount of C, M, and Y ink in the darkest neutral areas of the image when the colors exceed the specified ink weight configured in Color Settings. Thus, UCR is better suited for newsprint where ink is heavily restricted.