# Color Components of a Pixel

In-Sight Spreadsheet color vision systems capture image data in the RGB color space. This image data is then stored in memory, and can be exported either to 24-bit Bitmap format, or to JPEG format.

Based on data in one color space, the system can convert the acquisition mathematically to another color space. Some tools, such as ColorToGreyscaleFilter, take advantage of this explicitly, while others, such as monochrome 2D tools do this implicitly, where operating on a single color plane, or operating separately on color planes do not produce desirable results. By default, the available color 2D Vision Tools operate on the entirety of the acquired color image, and while different tools may use that data differently, all color information is used for results calculation.

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)