140 likes | 259 Views
CITA 342 Section 7. Working with Color. Working with Color. Graphical computer systems, such as Windows, use the red, green, blue, or RGB color system for specifying colors. You create individual colors in the RGB color system using the RGB().
E N D
CITA 342 Section 7 Working with Color
Working with Color • Graphical computer systems, such as Windows, use the red, green, blue, or RGB color system for specifying colors. • You create individual colors in the RGB color system using the RGB(). • The color created with an RGB() is sometimes referred to as an RGB triplet. • The syntax for using the RGB() is RGB(red, green, blue). RGB() returns a color of data type COLORREF.
Working with Color • Each of the three parameters in the RGB() can accept an integer value ranging from 0 to 255, which indicates the intensity to use for each color. • You create primary colors of red, green, or blue by using a full intensity value of 255 for one of the primary colors, but values of 0 for the other primary colors.
Color Models • Used to describe color as accurately as possible. • Make use of the fact that colors can be described by combinations of three basic colors, called primary colors. • An organization called the CIE (French abbreviation for the International Color Commission) produced models for defining color.
CIE XYZ Model • It defines three primary “colors” X, Y and Z that can be used to describe all visible colors, as well as a standard white “Illuminant C”. • The range of colors that can be described by combinations of primary colors is called a color gamut. • Since it is impossible to find three visible colors with a gamut containing all visible colors, the CIE’s three primary colors are imaginary. They cannot be seen, but they can be used to define other visible colors.
CIE XYZ Model • Each color chromaticity in the color gamut is a combination of xX+yY+(1-x-y)Z. • Plotting x and y gives the CIE chromaticity diagram:
RGB Model • The RGB stands for Red, Green, and Blue.
CMY Model • The CMY stands for Cyan (Blue + Green), Magenta (Red + Blue), and Yellow (Red + Green). • Used for reflective media, like printing.
CMYK Model • CMYK is a variant of CMY that enhances darkness by setting kCMYK = min (cCMY, mCMY, yCMY),and printing black with intensity k.
HSB Model • HSB stands for hue, saturation, and brightness. • Is also often called HSV (V for value).
Lab Model • L for lightness, and a and b for the color-opponent dimensions. • Based on CIE XYZ Model.
PMS Color Space • Pantone Matching System (PMS) is a standardized color reproduction system. • A proprietary color space used in a variety of industries, primarily printing,
YIQ Model • YIQ is the model used for television broadcasting. This model can be encoded by black and white or color TV sets. • yYIQ is the only component used in a black and white TV.