4.3 CMY Color Model
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 346 CMY color model
• The CMY color model is related to the RGB color model. •Itsbasecolorsare –cyan(C) –magenta(M) –yellow(Y) • They are arranged in a 3D Cartesian coordinate system. • The scheme is substractive.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 347 Subtractive color scheme
• RGC color model is subtractive, i.e., adding colors makes the resulting color darker. • Application: color printers. • As it only works perferctly in theory, typically a black cartridge is added (CMYK color model). Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 348 CMY color cube
• All colors c that can be generated are represented by the unit cube in the 3D Cartesian coordinate system.
magenta blue
white cyan
yellow green
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 349 CMY color cube
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 350 CMY color model
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 351 CMYK color model
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 352 Conversion
• RGB -> CMY:
• CMY -> RGB:
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 353 Conversion
• RGB -> CMYK:
•CMYK -> RGB:
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 354 4.4 HSV/HLS Color Models
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 355 HSV color model
• While RGB and CMY color models have their application in hardware implementations, the HSV color model is based on properties of human perception. • Its application is for human interfaces
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 356 HSV color model
The HSV color model also consists of 3 channels: • H: When perceiving a color, we perceive the dominant wavelength. This is represented by the hue (H). • S: Thepurityof a colorismeasuredbytheamountof frequencies in the light. The smaller the frequency spectrum, the purer the color. This is represented by the saturation (S). • V: The maximum amplitude of the light is given at its dominant wavelength. It represents the energy of the light given in form of its value (V).
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 357 HSV coordinate system
• The coordinate system of the HSV color model is given in form of a cone: – H is given in form of an angle in the range [0,360) which represents the rotational symmetry of the cone. Theorder of thecolorsisgivenbythefrequencyspectrum. – S is in the range [0,1] and its axis perpendicular to the V axis. – V is in the range [0,1] and its axis is the rotational symmetry axis of the cone.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 358 HSV coordinate system
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 359 HSV coordinate system
• Sometimes the cone is approximated by a 6-sided pyramid: green: 120° yellow: 60°
white cyan: 180° red: 0°
blue: 240° magenta: 300° grey
black
• The hexagon at the base of the 6-sided pyramid is the RGB cube projected along the grey axis.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 360 HSV color model
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 361 Conversion: RGB -> HSV
Let max = max {R,G,B} and min = min {R,G,B}: green: 120° yellow: 60°
cyan: 180° red: 0°
blue: 240° magenta: 300°
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 362 Conversion HSV -> RGB
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 363 HLS color model
• HLS color model is identical to HSV color model, but value V is replaced by lightness L. • Lightness is also in the range [0,1] • The cone coordinate system is replaced by a double- cone coordinate system, where the maximum cone radius is reached at L = 0.5.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 364 HLS coordinate system
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 365 HLS color model
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 366 Conversion RGB -> HLS
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 367 4.5 CIE Color Models
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 368 CIE color models
• CIE: Commission Internationale d‘ Eclairage
• Human color space (tristimulus): – x, y, and z axes represent the stimuli for the long- wavelength (L), medium-wavelength (M), and short- wavelength (S) receptors. – The human color space is a horse-shoe-shaped cone. – The origin corresponds to black and is the tip of the cone. – Brighter colors are farther removed from the origin. – The most saturated colors are located at the outer rim of the cone.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 369 Human color space
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 370 Gamut
• The set of colors described by a color model, is called its gamut. • We observed that the RGB gamut is a real subset of the human tristimulus gamut. • CIE tried to overcome this problem by replacing the R, G, and B wavelength with the tristimulus wavelengths. • They defined chromaticity curves with no negative components. • The 3 color channels are called X, Y, and Z.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 371 CIE XYZ color model
• The amplitudes of the curve were rather arbitrary. • The CIE xyz color model modifies them by scaling to equal areas under the curves. Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 372 CIE XYZ Color Model
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 373 Conversion
•RGB -> CIE XYZ:
• CIE XYZ -> RGB: –inversematrix – caveat: not always all entries will be nonnegative!
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 374 CIE xyY color model
• Normalization:
• z is not stored explicitly. • Instead we store a luminance channel Y. • x and y represent the chromatic channels.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 375 CIE xyY chromaticity diagram
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 376 Comparison CIE xyY vs. RGB
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 377 CIE L*a*b* color model • To further strengthen the correlation between the color model and human perception, we apply the following non-linear transformation:
with
where (Xn,Yn,Zn) are the tristimulus values of the reference white point.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 378 CIE L*a*b* color model
• L* represents a luminance or lightness channel. • a* and b* represent chromatic channels.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 379 CIE L*a*b* color model
Chromaticity diagram for various luminances:
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 380 CIE L*a*b* color model
Perceptually uniform: • The CIE L*a*b* color model is perceptually uniform , i.e., a change of the same amount in a color value should produce a change of about the same visual importance. • In other words, Euclidean distance in the color space is propotional to human perception.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 381 L*a*b* & RGB
• L*a*b* chromaticity diagram reduced to the colors that can be represented in RGB color space.
Jacobs University Visualization and Computer Graphics Lab
320322: Graphics and Visualization 382