Page 184 - DCAP504_Computer Graphics
P. 184

Unit 12: Color and Shading Model



               X b =X bCb, Y b = y bC b,  Z b =Z  bCb   where Z b = 1 – X b - y b
               Thus, the XYZ co-ordinates of a combined RGB color can be represented in terms of a transformation
               matrix M:









               Cr, Cg, and Cb can be identified in two different ways. The first way is to find the luminance levels Y r,
               Y g, and Y b of the red, green, and blue colors at their maximum intensity/brightness respectively with
               the help of a photometer. Then C r, C g, and C b becomes as follows:
               Cr = Y r/yr      Cg = Y g/y g           C b = Y b/y b

               The second way is to measure the XYZ co-ordinates (Xw, Y w, Z w) of the monitor's white color (R = G= B
               = l). Using these we have







               Now Cr, C g, and C b, can be solved.
               If M 1 is the transformation for monitor 1, and M2 is the transformation for monitor 2, then a color (R1,
               G1, B 1) on monitor 1 can be matched by a corresponding color (R 2, G2, B2) on monitor 2:
                                        -1
               [R 2 G 2 B 2] = [R 1 G 1 B 1]    M 1M 2
               with the condition that (R 2, G2, B 2) is within the color gamut of monitor 2.
               CMYK Color Model
               CMYK color model is a subtractive color model that uses cyan, magenta, yellow, and black colors. Each
               of these colors comprises ink that can be measured with a percent from 0 to 100.  A value of 100 percent
               signifies that the color can be applied at full saturation for any image.
               In CMYK color model, many new colors can be formed by combining cyan, magenta, yellow, and black
               colors. When the colors cyan, magenta, yellow, and black are combined together and if each color has a
               saturation of 100% then the resulting color should be black. When the saturation percent of each color is
               0 then it will result in pure white color.
               CMYK color model is  used to produce hardcopies of images. CMYK model can be used to generate
               millions of colors but as a result of the limitations of printing inks and the printing process, we can only
               produce few thousands of colors in print.  Even though only few thousands of colors can be generated,
               computers can display millions of CMYK colors.
               RGB Color Model
               Now, we will discuss how color can be handled in a graphics system. In a graphics system, a color can
               be handled using two approaches. The two approaches are:
               1.   Indexed color model
               2.   RGB color model
               When a computer graphics system uses 8 bits of memory to store each pixel of an image then the most
               effective way of generating the widest range of colors is to use indexed color model.

               In the indexed color model, the computer graphics designer will have control over the method by which
               colors are loaded into a color lookup table. The control over color loading can be achieved by specifying



                                        LOVELY PROFESSIONAL UNIVERSITY                          177
   179   180   181   182   183   184   185   186   187   188   189