ISSN: 2229-371X

All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

VARIOUS COLOUR SPACES AND COLOUR SPACE CONVERSION ALGORITHMS

Nishad PM1* and Dr. R.Manicka Chezian2
  1. Ph.D Scholar, Department Of Computer Science NGM College, Pollachi, India
  2. Associate professor, Department of computer science NGM College Pollachi, Coimbatore, India
Corresponding Author: Nishad PM E-mail: nishadpalakka@yahoo.co.in, chezian_r@yahoo.co.in
Related article at Pubmed, Scholar Google

Visit for more related articles at Journal of Global Research in Computer Sciences

Abstract

A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components (e.g. RGB and CMYK are color models). However, a color model with no associated mapping function to an absolute color space is a more or less arbitrary color system with no connection to any globally understood system of color interpretation. This paper mainly discusses about various colour spaces and the how they organized and the colour conversion algorithms like CMYK to RGB, RGB to CMYK, HSL to RGB, RGB to HSL , HSV to RGB , RGB To HSV , YUV to RGB And RGB to YUV.

Keywords

Colour spaces, colour conversion algorithms, CMYK, RGB, HSL, HSV and YUV

INTRODUCTION

A color space is all possible colors that can be made from a group of colourants, Imagine, for example, shining three lights together onto a white wall: one red light, one green light, and one blue light, each with dimmer switches. If only the red light is on, the wall will look red. If only the green light is on, the wall will look green. If the red and green lights are on together, the wall will look yellow. Dim the red light some and the wall will become more of a yellow-green. Dim the green light instead, and the wall will become more orange. Bringing up the blue light a bit will cause the orange to become less saturated and more whitish. In all, each setting of the three dimmer switches will produce a different result, either in color or in brightness or both. This colour mixer is also possible with the other colour spaces like CMYK, HSL, etc.
Digital cameras and scanners and create images using combinations of just three colors: Red, Green and Blue (RGB). These are the primary colors of visible light and this how computers and televisions display images on their screens. RGB colors often appear brighter and more vivid specifically because the light is being projected directly into the eyes of the viewer.
The CMYK color model (process color, four color) is a subtractive color model, used in color printing, and is also used to describe the printing process itself. CMYK refers to the four inks used in some color printing: cyan, magenta, yellow, and key black. Though it varies by print house, press operator and press manufacturer
At some stages one colour spaces must be translated in to other colour space. For example there is a need of printing an image in a printing press it is best if you do the RGB to CMYK Conversion of your images. You will have more control over the appearance of your printed piece if you convert all of the images from RGB to CMYK before sending them to us. This concept of converting one space to other spaces is also discussed in this paper

RGB COLOR SPACE

An RGB color space is all possible colors that can be made from three colourants for red, green and blue.
The color which we see is the continuous signal of wavelength of electromagnetic radiations. The visible range lies within the 380 to 780 nm. However, most of the display system uses the three channels to render the color image; these three channels are Red, Green and Blue in RGB color spaces [1].
All color spaces can be derived from the RGB information supplied by devices such as cameras and scanners. Different color spaces have historically evolved for different applications. In each case, a color space was chosen for application-specific reasons.
Figure 1: RGB Color Cube
image
Figure 2: Red , Blue , Green - Additive colors
The red, green and blue (RGB) color space is widely used throughout computer graphics. Red, green and blue are three primary additive colors: each color normally ranges from 0 to 255[3] that is R= {0, 1, 2 ….. 255}, G= {0, 1, 2 ….. 255} and B= {0, 1, 2 ….. 255} shown in table-1, individual components are added together to form a desired color, and are represented by a three dimensional, RGB colour cube is shown in Figure -1 and Chart -1. Figure -2 represents the RGB Additive Colures.
image
Table -1 100% RGB Colour bar
In RGB Color cube each point represents the combination of the maximum and minimum emission of each primary. When the amounts of three primaries (Red, Green and Blue) are in minimum levels the black color is produced; when the amounts of three primaries are in maximum levels, the white color is produced [1]. The basic rule of mixing in RGB color cube is following
R+G+B=White
R+G=Yellow
R+B=Magenta
G+B=Cyan
Using Red and Green and Blue in computer Graphics Can create desired colors. However, RGB is not very efficient when dealing with real-world images. All three components need equal bandwidth to generate arbitrary colors within the RGB color cube. Also, processing an image in the RGB color space is usually not the most efficient method. For example, to modify the intensity or color of a given pixel, all three RGB values must be read, modified and written back to the frame buffer. If the system had access to the image stored in the intensity and color format, the process would be faster. The equation-1 is used to find the color of a pixel.
image
image
chart-1 RGB Color Bar

CMYK COLOR SPACE

A CMYK color space is all possible colors that can be made from four colourants for cyan, magenta, yellow, and key black.
The “K” in CMYK stands for key since in four-color printing cyan, magenta, and yellow printing plates are carefully keyed or aligned with the key of the black key plate. Some sources suggest that the “K” in CMYK comes from the last letter in "black" and were chosen because B already means blue.
In the CMYK color system equal proportions of Yellow plus Cyan produces Green, Yellow plus Magenta produces Red, and Cyan ink plus Magenta produces Blue (actually more like purple to most eyes). Various color shades and values are achieved by varying the relative amounts of the four colors. Black is added to improve the quality of images. The basic rule of mixing in RGB color cube is following
image
Figure 3: CMYK Subtractive color
C + Y = Green
C + M = Blue
M + Y =Red
C+M+Y = Black
The CMYK color space is widely used in printing. Cyan, Magenta and Yellow are three primary additive colors: each color normally ranges from 0 to 255 that is M= {0, 1, 2 ….. 255}, C= {0, 1, 2 ….. 255} and Y= {0, 1, 2 ….. 255} shown in table-2, individual components are added together to form a desired color, and are represented by a three dimensional, RGB colour cube is shown in Figure -4 and Chart -2. Figure -3 represents the CMYK Subtractive Colour
image
Table -2 100% CMYK Colour Bars
image
Figure 4 : CMY color cube
image
Chart 2 : CMYK color Bar

HSV COLOR SPACE

The HSV color space attempts to characterize colors according to their hue, saturation, and value (brightness) shown in Figure -4.
Hue- The hue of a color identifies what is commonly called “color”. For example, all reds have a similar hue value whether they are light, dark, intense, or pastel [4]. Ranges from 0-360 (but normalized to 0-100% in some applications).
Saturation-The saturation of a color identifies how pure or intense the color is. A fully saturated color is deep and brilliant as the saturation decreases, the color gets paler and more washed out until it eventually fades to neutral[4]. Ranges from 0-100%.Also sometimes called the "purity" by analogy to the colorimetric quantities excitation purity and colorimetric purity. The lower the saturation of a color, the more "grayness" is present and the more faded the color will appear, thus useful to define de-saturations the qualitative inverse of saturation
Brightness-The brightness of a color identifies how light or dark the color is. Any color whose brightness is zero is black, regardless of its hue or saturation. There are different schemes for specifying a color's brightness and depending on which one is used; the results of lightening a color can vary considerably [4]. Ranges from 0-100%
This color space is based on a so-called hex-cone model which can be visualized as a prism with a hexagon on one end that tapers down to a single point at the other. The hexagonal face of the prism is derived by looking at the RGB cube centered on its white corner. The cube, when viewed from this angle, looks like a hexagon with white in the center and the primary and secondary colors making up the six vertices of the hexagon. This color hexagon is the one Picture Window uses in its color picker to display the brightest possible versions of all possible colors based on their hue and saturation. Successive cross sections of the HSV hex-cone as it narrows to its vertex are illustrated below showing how the colors get darker and darker, eventually reaching black [3] [4].
image
Figure 4 : HSV color model

HSL COLOR SPACE

The HSL color space, also called HLS or HIS or HSB. HSI stands for Hue, Saturation, Lightness (also Luminance or Luminosity) / Intensity/ Brightness.
Luminance- The luminance of a color is a measure of its perceived brightness. The computation of luminance takes into account the fact that the human eye is far more sensitive to certain colors (like yellow-green) than to others (like blue) [4].
This color space is based on a double hexagon model which consists of a hexagon in the middle that converges down to a point at each end. Like the HSV color space, the HSL space goes to black at one end, but unlike HSV, it tends toward white at the opposite end. The most saturated colors appear in the middle. Note that unlike in the HSL color space; this central cross-section has 50% gray in the center and not white [4] [5].

YUV COLOR SPACE

There are some drawbacks with this representation. For example, the brightness of a pixel may not be changed easily, as it must be computed from the RGB components. These components must then be recalculated with the new intensity in order to obtain the same color, brighter. Standard video signals like Phase Alternation Line [PAL], National Television System Committee [NTSC] or Sequential couleur avec memoire [SECAM] hence uses an alternative colour scheme, YUV. The Y component represents luminance, or intensity, which is suitable for black and white display devices. With the introduction of colour TV two additional signals, U and V were added to represent colour [6].

COLOUR SPACE CONVERSIONS [6].

RGB to CMY:

image
image
image

CONCLUSION

A color space is all possible colors that can be made from a group of colorants. In this paper discussed about varies colour spaces and how can produce different colours using different colour spaces. Also discussed the various colour space conversion algorithms used to convert one space to other space.

References

[1]. PesalKoirala Department of Computer Science and Statistics University of Joensuu.- “RGB Color Spaces”

[2]. Danny Pascale -“A Review of RGB Color Spaces From xyY to RGB” (2000-2003)

[3]. Darrin Cardani- “Adventures in HSV Space”

[4]. Jonathan Sachs -“Digital Image Basics”

[5]. Adrian Ford and Alan Roberts “Colour Space conversions” August 11, 1998

[6]. Etienne Dupuis -“Optimizing YUV-RGB Color Space Conversion Using Intel’s SIMD Technology”- August 2003

[7]. William David Wright, 50 years of the 1931 CIE Standard Observer. Die Farbe, 29:4/6 (1981).

[8]. Dean Anderson. "Color Spaces in Frame Grabbers: RGB vs. YUV". Retrieved 2008-04-08.