In middle school physics class, we may have done the experiment of prism. White light is decomposed into various colors after passing through the prism, which are red, orange, yellow, green, cyan, blue and purple in turn. This is the visible spectrum. Among them, the human eye is most sensitive to red, green and blue. The human eye is like a three-color receiver system, and most colors can be synthesized by different proportions of red, green and blue. Similarly, most monochromatic light can be decomposed into three colors: red, green and blue. This is the most basic principle of colorimetry, that is, the principle of three primary colors. The three primary colors are independent of each other, and none of them can be combined with the other two colors. Red, green and blue are the three primary colors, which have the widest color range. The three primary colors of red, green and blue are added in different proportions to synthesize mixed color, which is called additive mixed color.
Red+Green = Yellow
Green+blue = cyan
Red+blue = magenta
Red+Green+Blue = White
Yellow, cyan and magenta are all mixed by two hues, so they are also called additive secondary colors. In addition:
Red+cyan = white
Green+magenta = white
Blue+yellow = white
So cyan, yellow and magenta are complementary colors of red, blue and green respectively. Because everyone's eyes feel different about the same monochrome, if we mix the three primary colors with the same intensity, it is assumed that the intensity of white light is 100%. At this time, people's subjective feeling is that green light is the brightest, followed by red light and blue light is the weakest.
In addition to additive color mixing method, there are subtractive color mixing method. Under the irradiation of white light, cyan pigment can absorb red and reflect cyan, yellow pigment absorbs blue and reflects yellow, and magenta pigment absorbs green and reflects magenta. That is:
White-red = cyan
White-green = magenta
White and blue = yellow
In addition, if cyan and yellow pigments are mixed, under the irradiation of white light, because the pigments absorb red and blue and reflect green, we will express the mixing of pigments as follows:
Pigment (yellow+cyan) = white-red-blue = green.
Pigment (magenta+cyan) = white-red-green = blue.
Pigment (yellow+magenta) = white-green-blue = red.
All of the above are subtractive color mixing, and different colors are formed by absorbing different proportions of three primary colors. So there are three primary colors called cyan, magenta and yellow. The mixing of three primary colors of pigments has been widely used in painting and printing. Among the three primary colors of pigments, red, green and blue are called subtractive secondary colors or pigment secondary colors. The secondary colors in subtractive method are:
(cyan+yellow+magenta) = white-red-blue-green = black
The color mode represented by the above-mentioned additive and mixed colors is called RGB mode, and the color mode represented by the principle of subtractive and mixed colors is called CMYK mode, which is widely used in painting and printing fields.
RGB mode is the most commonly used color mode in drawing software. In this mode, it is more convenient to process images, and the images stored in RGB are smaller than those stored in CMYK, which can save memory and space.
CMYK mode is a kind of pigment mode, so it belongs to printing mode, but it is essentially the same as RGB mode, but the way to produce color is different. RGB is additive color mixing mode, and CMYK is subtractive color mixing mode. For example, the display adopts RGB mode, because the display emits bright light by bombarding fluorescent substances on the screen with electron beams, thus producing colors. It is black when there is no light, and white when the light is maximized. What about the printer? Its ink doesn't glow by itself. Therefore, only colors that absorb specific light waves and reflect other light rays are used, so subtractive color method is needed to solve this problem.
(2), HLS (hue, brightness, saturation) principle
HLS is hue, brightness and saturation. Hue is an attribute of color, which is essentially the basic color of color, that is, we often say seven kinds of red, orange, yellow, green, cyan, blue and purple, each of which represents a hue. Hue adjustment means changing its color.
Brightness is the brightness of graphic primary colors of various colors (for example, the primary colors of RGB images are R, G, B or various tones), and brightness adjustment is also the adjustment of brightness. The brightness ranges from 0 to 255, and * * * is divided into 256 levels. What we usually call a grayscale image is divided into 256 levels of brightness between pure white and pure black, that is, from white to gray and then to black. Similarly, in RGB mode, the brightness of the three primary colors, that is, the brightness of the three primary colors of red, green and blue, goes from shallow to deep.
Saturation refers to the chromaticity of image color. Each color has an artificially specified standard color, and saturation is a physical quantity that describes the similarity between color and standard color. Adjusting the saturation is to adjust the chromaticity of the image. When the saturation bar of the image is zero, the image becomes a gray image. You can try adjusting the saturation button on the TV.
Another concept is contrast. Contrast refers to the difference between different colors. The greater the contrast, the greater the difference between the two colors, and vice versa. For example, when the contrast of a grayscale image is improved, it will become more black and white. Adjust to the limit, it will become a black and white image. Instead, we can get a gray canvas.