In the process of graphic image processing, the color mode is based on establishing a model for describing and reproducing the color. Each mode has its own characteristics and application range, and the user can determine the color mode according to the production requirements and can Need to switch between different color modes. Below, the concept of some commonly used color modes is introduced.
1. RGB color mode
Most of the visible spectrum in nature can be represented by a mixture of different proportions and intensities of red, green and blue light. RGB stands for 3 colors: R for red, G for green, and B for blue. The RGB model is also called the additive model, as shown in Figure 5. RGB models are commonly used for lighting, video, and screen image editing.
The RGB color mode uses the RGB model to assign an intensity value ranging from 0 to 255 for the RGB component of each pixel in the image. For example: pure red R value is 255, G value is 0, B value is 0; gray R, G, B three values ​​are equal (except 0 and 255); white R, G, B are 255; black R, G, B are all 0. With only three colors, RGB images can be mixed in different proportions to reproduce 16581375 colors on the screen.
2. CMYK color mode
The CMYK color mode is based on the light absorption properties of the printing ink on the paper. Each pixel in the image is composed of indigo (C), magenta (M), yellow (Y), and black (K) colors in different proportions. . Each printing ink for each pixel is assigned a percentage value, the brightest (highlight) color distribution is assigned a lower printing ink color percentage value, and the darker (dark) color is assigned a higher percentage value. For example, bright red may contain 2% cyan, 93% magenta, 90% yellow, and 0% black. In the CMYK image, pure white is generated when the values ​​of all 4 components are 0%. The CMYK color mode contains four channels in the image, as shown in Figure 6. The graphics we see are the effects of these four channels.
Use the CMYK color mode when making images for print-color printing. Images in the RGB color mode converted to CMYK color modes produce separations. If the image material you are using is RGB color mode, it is best to convert to CMYK color mode after editing.
3. HSB color mode
The HSB color mode is a set of color modes based on the visual characteristics of human eyes in daily life, which is closest to the way humans think about color recognition. The HSB color mode describes the basic characteristics of a color as hue (H), saturation (S), and brightness (B).
Hue refers to the color reflected from the object or transmitted through the object. On a standard color wheel from 0 to 360 degrees, hue is measured by position. In normal use, hue is identified by a color name, such as red, orange, or green.
Saturation refers to the intensity or purity of the color, expressed as the proportion of the gray component in the hue. 0% is pure gray and 100% is fully saturated. On the standard color wheel, the saturation from the center position to the edge position is increasing.
Brightness refers to the relative lightness or darkness of the color. Usually 0% is defined as black and 100% is defined as white.
The HSB color mode is easier to understand than the two color modes described earlier. However, due to the limitation of the device, when it is displayed on a computer screen, it is converted to an RGB mode, and as a printout, it is converted to a CMYK mode. This limits the use of the HSB mode to some extent.
4. Lab color mode
The Lab color model consists of a photometric component (L) and two chrominance components, namely the a component (from green to red) and the b component (from blue to yellow), as shown in FIG. The Lab Color mode is device-independent and no matter what device is used (such as a monitor, printer, or scanner) to create or output images, this color mode produces consistent colors.
Lab Color Mode is typically used to process Photo CD (Photo Disc) images, edit brightness and color values ​​in separate images, transfer images between systems, and print to Postscript (R) Level 2 and Level 3 printers.
5. Indexed Color mode
The indexed color mode uses up to 256 colors. When you convert an image to an indexed color mode, you usually build a palette to store and index the colors in the image. If a color in the original image does not appear in the palette, the program will select the closest color in the existing color or use the existing color to simulate the color.
In indexed color mode, the file size can be reduced by limiting the number of colors in the palette while maintaining visual quality. It is often necessary to use index mode images in web pages.
6. Bitmap color mode
Bitmap mode images consist of only black and white pixels. Each pixel is represented by a "bit". The "bit" has only two states: 0 means a bit, 1 means no dot. The bitmap mode is mainly used for devices that did not recognize color and grayscale in the early days. If you need to represent the gray level, you need to simulate it with the jitter of the point.
Bitmap mode is usually used for character recognition. If scanning requires image files identified using OCR (optical character recognition) technology, the image must be converted to bitmap mode.
7. Grayscale color mode
The grayscale mode uses up to 256 levels of grayscale to represent the image, and each pixel in the image has a luminance value between 0 (black) and 255 (white). Grayscale values ​​can also be expressed as a percentage of black ink coverage (0% for white and 100% for black).
When converting a color image to a grayscale image, all the color information in the original image is discarded. Compared with the bitmap mode, the grayscale mode can better represent high-quality image effects.
It should be noted that while some image processing software allows you to reconvert a grayscale image into a color mode image, it is not possible to restore the original lost color after the conversion. You can only recolor the image. Therefore, when converting a color mode image to a grayscale mode, you should keep the backup file as much as possible.