We will start with the most popular color space, RGB. As we know, RGB is made up of the colors red, green, and blue. We can mix them up to produce any color:
Fig 4.17: RGB color space
You can check the image and the license at https://commons.wikimedia.org/wiki/File:RGB_Cube_Show_lowgamma_cutout_b.png#/media/File:RGB_Cube_Show_lowgamma_cutout_a.
In the OpenCV library, colors are stored in BGR format, not in RGB format. So when we load the images using OpenCV, it will be reversed, starting with blue, moving to green, and ending with red.
The RGB color table for various colors is shown in the following screenshot:
Fig 4.18: RGB color table
In the next section, we are going to learn about the HSV color space in detail.