Color space conversion between RGB and CMYK
In the pre-press and printing process, the same image with the same information may be displayed with different color effects when displayed on different monitors, and the colors may be different when output by different color printers. Very different from the printing effect. The same color data can't get the same color on different devices. The color of the same color data in different stages of design and pre-press production operations is also difficult to be consistent. What is the reason? The reason is that the data representation of these images uses RGB color space or CMYK color space, and they are all device-related representation methods, which means that a set of RGB or CMYK data will make the human eye see what color is related to the presentation of this The device characteristics of colors are closely related. In the field of printing and copying, this phenomenon is called the "device correlation of color" phenomenon, that is, the same color has obvious differences in the colors entered or displayed on the scanners or monitors provided by different manufacturers with the same two modes. ; Similarly, there are obvious color differences in the output results obtained on printers provided by different manufacturers with the same two modes. In the process of prepress copying, the same color should be transferred between different hardware devices. The original (mostly the principle of subtractive color formation, the digital manuscript page is the principle of additive color formation) after scanning, image processing (additive color formation principle) 3. Finally output digital proofs (subtractive color forming principle). Due to the essential difference between the additive color forming principle and the subtractive color forming principle, how to ensure the consistency of the color of each process link in the pre-press copy process, so as to achieve the control of the color copy quality For the purpose, we need to understand the transformation between RGB color space and CMYK color space. 1 The concept of color space Color space refers to a subset of visible light in a three-dimensional color domain, which contains all colors in a color domain. For example, the RGB color model is a unit cube of a three-dimensional rectangular coordinate color system. The purpose of the color space model is to conveniently specify colors within a certain color domain. Since each color domain is a subset of visible light, any color model cannot contain all visible light. It is usually described by three relatively independent attributes. The combined effect of three independent variables naturally forms a space coordinate, which is the color space. The color can be described from different angles and in groups of three different attributes, resulting in different color spaces. But the color object described is objective. Different color spaces only measure the same object from different angles. The color space can be divided into two categories according to the basic structure. The primary color space and the color space separate the color space. The former is typically RGB, and also includes CMY, CMYK, etc. The latter includes YCC / YUV, Lab, and a batch of "hue-like color spaces". [next] 2 RGB color space model The three primary colors of colored light in nature are red, green, and blue. The human eye feels color by stimulating the vertebrate cells of the retina with three kinds of visible light. The stimulation of these colored light peaks at wavelengths of 630nm, 530nm and 450nm. By comparing the intensity of each stimulus, we feel the color of light. The vast majority of the visible spectrum can be represented by a mixture of red, green, and blue light in different proportions and intensities. In the field of image replication, 256 gradation values ​​are often used to measure RGB separately, usually assigned to 3 color channels A value describes its level. 0 corresponds to no light, and 255 corresponds to the strongest light. The three RGB color channels are pure red, pure green, and pure blue. When all three channels are 255, white light will be generated, red is 255, and green and blue are 0. Will simulate the effect of pure red light. Taking the three parameters of R, G, and B as coordinates, a unit cube as shown in Fig. 1 can be obtained to describe the RGB color model. RGB is an additive color model. The brightness, chroma, and purity of the light source are mixed in the three parameters of R, G, and B. The brightness L of the light source is expressed as: L = 0.3R + 0.6G + 0.1R. Of course, the coefficients here are only approximate. Its specific value depends on the phosphor standard used by the display. With the NTSC video signal standard, the three coefficients are: 0.299, 0.587, and 0.144. Colored light mixing is also called additive color mixing. When different colored lights are irradiated at the same time, another new colored light can be produced. With the increase of the mixing amount of different colors, the brightness of the mixed light will gradually increase, and the energy will also increase. getting bigger. Equal amounts of red light and green light are mixed to produce yellow light; equal amounts of red light and blue light are mixed to produce magenta light; equal amounts of green light and blue light are mixed to produce cyan light; equal amounts of red, green, and blue primary colors are mixed to produce White light. If the three primary colors are mixed in different amounts, a richer color mixing effect will be produced. The diagonal line of the color cube from point (0, 0, 0) to point (1, 1, 1) is equal to red, green, and basket, respectively, and different levels of gray produced by superimposing, a grayscale image All pixel values ​​in will fall on this diagonal, which means that the gray color space is a subset of the RGB color space, and this diagonal line is called the gray line. [next] 3 CMYK color space model For digital proofing and color printing, because of the use of dyes or pigments, that is to say, yellow, magenta, and cyan are used to superimpose or display the color of the original. In theory, according to the mixing principle of subtractive colorants, the three primary colors of cyan, magenta, and yellow should be mixed to produce the same number of colors as the RGB color model. The CMY color space forms different colors based on how much light is absorbed. The color of the ideal subtractive three primary colors will also appear in the cube of Figure 1, and its three main colors can be calculated from the following formula: CMY? =? 111?-? RGB? Theoretically, the mixture of yellow ink, magenta ink, and cyan ink in different proportions can achieve the reproduction of all colors. Mixing 100% yellow, 100% magenta, and 100% cyan can produce black. However, because the ink used for printing is not an ideal ink, that is to say, the ideal yellow ink should originally reflect 500-700nm of visible light and completely absorb 400-500nm of visible light, but the actual yellow ink used is not like this, it is at 500 The reflection at this part of ~ 700nm is insufficient, and the absorption at 400 ~ 500nm is insufficient because the yellow ink develops a small amount of magenta and cyan components. Other inks have the same problem. When printing or printing out, if we don't use black ink, 100% yellow, 100% magenta and 100% cyan will be mixed to get a tan, which does not show true black. Usually we add black to ensure that dark and gray are not biased. Therefore, a black version should be added to express true black. This is the reason why people often refer to the CMYK color model, and rarely mention the CMYK color model. The CMYK color model is mainly used for colors to be expressed with colorants, such as process colors, color printer output, paint colors, and so on. The CMYK color space should be said to be an application color space. It essentially refers to the size of C, M, Y, and K dots printed when reproducing colors. Therefore, the value range of CMYK is 0% to 100%, not 0 to 255. C0% M0% Y0% K0% means white, C0% M0% Y0% K100% means black. [next] 4 Conversion from RGB to CMYK If you want to convert an RGB image to a CMYK image in pre-press platemaking, the essence is to transform the image from the RGB color space to the CMYK color space. Although this is purely a color space conversion, it is still called it as a split color. There are two complex problems in the conversion process. The first is that the two color spaces are not exactly the same in the range of colors. RGB has a larger color gamut and CMYK is smaller, so color gamut compression is necessary; The second is that these two colors are related to specific devices, and the colors themselves are not absolute. Therefore, it needs to be converted through a color space independent of the device, for example, through the LAB color space. 1) Color conversion When color mapping is performed from one color space to another color space, three color mapping methods of "gamut compression", "tone compression" and "white point mapping" can be used to map the gamut of the device. ①There are three methods for color gamut compression. One is to keep the color in the color gamut unchanged, and the color outside the color gamut is replaced by the closest color to it. One method is to keep the color in the color gamut unchanged and outside the color gamut. The colors are copied with the highest possible saturation; one method is to project the colors outside the gamut to the edge of the gamut, all other colors are evenly compressed in the gamut, and the angle corresponding to the color is unchanged, resulting in saturation reduce. 2) In the color separation process, the chromaticity value of the original color of the picture is L0, A0, B0, and the digital signal is formed by the scanner or digital camera to enter the graphic processing system. In general, the color light of the original is decomposed into three components of red, green, and blue, and the digital signals of the image are R1, G1, and B1. 3) Separation calculation When separating colors, you need to calculate the black value first, and then you can calculate the values ​​of the other three color components YMC. There are many ways to generate black version, and the black version generation methods used in Photoshop are UCR (Underground Color Removal) and GCR (Gray Component Replacement). Taking the background color removal as an example, the theoretical conversion of the color space from RGB to CMYK needs to read the R, G, B values ​​first, and generate the intermediate quantities c, m, y, k, and then use the black generation function to generate according to the UCR principle The black version, the black generation function and the background color removal function are related to the currently selected paper and ink combination, the halftone dot expansion function of each color version, the black ink volume limit, and the total ink limit. For example: given a set of R, G, and B values ​​(RGB represents the color position in the unit cube color model), the intermediate values ​​y, m, and c can be calculated by the following formula. The black value determined by background color removal is: k = min? c, m, y? After obtaining the four intermediate values ​​of c, m, y and k, after taking into account the influence of the black generation function and the background color removal function, adjust with the following formula to calculate the final C, M, Y and K values: C = min {0, c-UCR (k)} 3) Separation settings in Photoshop Allows us to choose the type of separation in Photoshop? We can choose to remove the background color? UCR can also choose gray components instead of GCR. The background color removal is a color separation method that removes the gray component of the dark tone, and replaces it with black ink. Its typical advantages are: the use of low-cost black ink to replace the expensive color ink to copy the gray component of the dark part of the original document, reducing printing costs; at the same time also reducing the thickness of the total ink layer, which is conducive to rapid overprinting and adaptation To meet the needs of high-speed printing and facilitate neutral gray balance and neutral gray reproduction. The amount of removal is usually limited, it determines the length of the black tone, generally about 30% to 40%. "Black ink limit? Black ink limit?" Refers to the maximum amount of black ink allowed in the dark area of ​​the image. It is essentially a dark calibration on the black dichroic film, which will affect the generation curve of the black version. . Normally, we set it to 90% to 100%. "Total ink limit?" Refers to the sum of yellow, magenta, cyan, and black inks. Too high total ink will have a negative impact on the drying of the ink and reduce the printing speed. Usually we set the total ink volume at 220% ~ 300%. The theoretical basis of ash component substitution is that there is no need to use yellow, magenta, and cyan inks to produce neutral ash that can be obtained with black ink only. This process makes the ink drying time shorter, printing speed faster, and printing cost lower. In Photoshop, we have a variety of black version generation modes to choose from: None, Light, Medium, Heavy, Maximum, and custom modes. "Under Color Addition?" Refers to the addition of color ink in the black ink overprinting area in the dark area of ​​the image, which can restore the neutral color of the image and increase the subtle level of the image in the dark area of ​​the image. Generally speaking, the background color The amount of gain is around 10%. The background color gain is evolved from the background color removal, and is only effective for the neutral gray area of ​​the image, but not for the color part of the image. Gray component replacement and background color removal are two different concepts. Background color removal only works on dark areas of the image, while gray component replacement works on the entire image and the complex color structure. The range of background color removal is relatively small, and gray component replacement can be used for full-tone removal. Beauty Scissors,Hair Scissors,Ophthalmic Scissors,Eyebrow Scissors Yangjiang Etina Houseware Co., Ltd. , https://www.etinanailtools.com
â‘¡Tone compression There are two methods of tone compression. One is to accurately reproduce the brightness in the color gamut, and the brightness outside the color gamut increases or decreases until it is just in the color gamut. This method will cause the contrast of the color to be compressed in the highlight or dark tone; another method is that the maximum brightness of the two color spaces overlap each other, and the other brightness is dynamically adjusted, that is, uniformly compressed.
③White point mapping There are two methods for white point mapping. One is to project the tone values ​​of the color space of the input device to the color space of the output device uniformly, so that the white field and the standard observer are obtained. The light source is D50, The white field with a field of view angle of 2 ° corresponds. Another method is to convert the hue value of the color space of the input device relative to the whiteness of the paper or substrate to a new color value. [next]
Subsequently, the color image is displayed on the display screen. The operator corrects the image color in the image processing software according to the color status of the image, and the processed image signal becomes R2, G2, and B2. In order to output digital color proofs, the image colors are converted into R3, G3, and B3 to drive the printer to print, and the colors are transferred to the printing paper. The colors of the proofs are L1, A1, and B1.
In order to meet the needs of printing and copying, the image is converted into cyan, magenta, yellow, and black four-color mode, and the color changes from R2, G2, and B2 to the dot area ratios Y1, M1, C1, and K1. After imposition, RIP and laser imagesetter output, color separation film was obtained. The dot area ratio on the film was Y2, M2, C2, K2, and after printing, the dot area ratio on the printing plate was Y3, M3, C3, K3, finally on the printing press, the ink dots are transferred from the printing plate to the printing material, and the dot area ratio becomes Y4, M4, C4, K4. Together with the printing material, the final printed color L2, A2, B2 is determined.
c = 1-R, m = 1-G, y = 1-B
M = min {1.0, max (0.0, m-UCR (k))}
Y = min {1.0, max (0.0, y-UCR (k))}
K = min {1.0, max (0.0, BG (k))}