Color Components of a Pixel

Each color pixel is composed of three separate color components. These components can be represented as combinations of red, green and blue (RGB), or hue, saturation and intensity (HSI). For both RGB and HSI, each component of a pixel is converted to a value from 0 to 255.

RGB colors are created by combining shades of red, green and blue in different proportions. The combination produces a specific color for each pixel; examples are shown below.

The values of the RGB components for the above 'pixel' are (255,0,0) The values of the RGB components for the above 'pixel' are (0,255,0) The values of the RGB components for the above 'pixel' are (0,0,255)

The values of the RGB components for the above 'pixel' are (200,0,0) The values of the RGB components for the above 'pixel' are (150,0,0) The values of the RGB components for the above 'pixel' are (85,0,0)

For HSI, the hue of a color corresponds to its location within the visible portion of the electromagnetic spectrum of radiation:

The conversion of a hue to a numerical value is done by creating a color wheel. A color wheel places all of the hues from the spectrum on a circle. A particular hue is specified by giving the angle at which that hue lies on the color wheel. The following figure shows a color wheel:

Note: The range of hue values is scaled to the range 0 through 255.

The saturation of a color is the degree to which the color is mixed with grey or white. A fully saturated color is pure. As a color becomes mixed with white (or grey) it becomes less saturated. The following figure shows a range of saturation values for a single hue:

The intensity of a color is a measure of its brightness. The intensity of a color is defined as the average value of the red, green and blue components that make up the color. The resulting mixture of hue, saturation and intensity produces the correct color for each pixel; examples are shown below.

The values of the HSI components for the above 'pixel' are (0,255,85) The values of the HSI components for the above 'pixel' are (85,255,85) The values of the HSI components for the above 'pixel' are (170,255,85)