We will rely entirely on the RGB color model.
The color effect is achieved by combining different levels of red, green, and blue (RGB). Each color runs from 0 to 255. Thus, in an RGB image to every pixel there assigned 3 integers. One can think of a color image as a 3-vector attached to each pixel or as 3 tables of integers, etc. Our approach will be different. By means of a procedure similar to thresholding described above we represent color images as arrays of binary images. The color space is a 255×255×255 array with each entry corresponding to a particular color. As a result, thresholding a color image will produce a 255×255×255 array of binary images.
Turns out this image has only one object!
The goal is to detect and capture objects in an images. But what is an object? The answer is quite obvious in the case of a binary image. It is either a connected cluster of black pixels on white background or a connected cluster of white pixels on black background. What about a gray scale image? Our approach follows human perception - a dark region on a light background may be an object and so is a light region on a darker background.
This approach is also valid for color images; for example, one may have a dark red object on a light red background. A green object on a red background has no red and, therefore, is also detectable with this approach.
If only one of the three primary color is changing, the topology is the same as that of the corresponding gray scale image:
Similarly, all three colors may be changing producing the same effect of a dark object on a light background.
For more see Graph representation of topology of color images.
Color images is an example of multiparametric images.