Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour.

Similar presentations


Presentation on theme: "Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour."— Presentation transcript:

1 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour

2 © 2004, MacAvon Media Productions 6 Require a model that relates subjective sensation of colour to measurable phenomena Spectral Power Distribution (SPD) How intensity varies with wavelength Good model, but too cumbersome to work with in computer graphics Tristimulus Theory Any colour can be produced by mixing different amounts of three additive primaries Colour & Science 157–158

3 © 2004, MacAvon Media Productions 6 Use standard red, green and blue as primaries Actually no single agreed standard Cannot mix all visible colours from R, G and B Restricted to RGB gamut Basis of colour reproduction in monitors Represent any colour with three numbers (r,g,b) Use as pixel's stored value in bitmapped image RGB Colour 158–160

4 © 2004, MacAvon Media Productions 6

5 6 RGB Colour Cube Green Red Blue Green (0,1,0) Cyan (0,1,1) Yellow (1,1,0) White (1,1,1) Black (0,0,0) Blue (0,0,1) Magenta (1,0,1) Red (1,0,0)

6 © 2004, MacAvon Media Productions 6 Can choose number of bits for each of r, g and b More bits per component means more colours can be distinguished, but image files will be larger 8 bits (1 byte) per component: 24-bit colour, millions of colours If r = g = b, colour is a shade of grey, so greyscale can be represented by a single value 8 bits permits 256 greys Colour Depth 161

7 © 2004, MacAvon Media Productions 6 8-bit colour only permits 256 colours Instead of storing (r, g, b) for each pixel, store an index into a palette or colour lookup table (CLUT) Index can be small, usually a single byte Palette stores up to 256 (for 1-byte index) 24- bit values To determine colour of a pixel, look at the stored value, use it to look up full 24-bit (r, g, b) value in palette Indexed Colour 163–167

8 © 2004, MacAvon Media Productions 6

9 6

10 6 Ideally choose 256 most important colours in an image to store in its palette When 24-bit image is reduced to indexed colour, some colours may be missing form the palette Replace missing colour by nearest, may lead to posterization Dither – use pattern of dots and optical mixing Web-safe palette – 216 colours guaranteed to reproduce accurately on all platforms and browsers Colour Palettes 167–169

11 © 2004, MacAvon Media Productions 6

12 6

13 6 Subtract additive primary from white gives its complement Equivalently, add other two additive primaries C = G+B = W-R M = R+B = W-G Y = R+G = W-B Cyan, magenta and yellow are subtractive primary colours (mixing ink/paint) Complementary Colours 170–171

14 © 2004, MacAvon Media Productions 6 Additive Colour Matching Mixing different amounts and wavelengths of light together produces colours Maxwell’s trichromatic colour theory

15 © 2004, MacAvon Media Productions 6 Real inks do not correspond to ideal subtractive primaries Combining three inks for black is undesirable Printers use four process colours, cyan, magenta, yellow and black CMYK gamut is not the same as RGB Implications for using images prepared for print (CMYK) on the Web (RGB) CMYK Colour 172–173

16 © 2004, MacAvon Media Productions 6

17 6 Alternative way of specifing colour Hue (roughly, dominant wavelength) Saturation (purity) Value (brightness) Model HSV as a cylinder: H angle, S distance from axis, V distance along axis Basis of popular style of colour picker HSV 173–176

18 © 2004, MacAvon Media Productions 6 The HSV Hexicone Black Red Green Blue Yellow Cyan Magenta White Saturation Value Hue

19 © 2004, MacAvon Media Productions 6 Using HSV First, select the colour (pure hue) which most closely matches the desired colour (hue)

20 © 2004, MacAvon Media Productions 6 Using HSV cont. Lighten the colour by adding white (saturation) Saturation indicates the degree to which the hue differs from a neutral grey. The values run from 0%, which is no colour saturation, to 100%, which is the fullest saturation of a given hue at a given percentage of illumination.

21 © 2004, MacAvon Media Productions 6 Using HSV cont. Darken or lighten the colour appropriately by changing the level of illumination. Values run as percentages; 0% appears as black (no light), whilst 100% is full illumination, which washes out the colour.

22 © 2004, MacAvon Media Productions 6 Can be useful to separate brightness and colour information, especially for video Luminance Y not simply related to R, G and B because eye is more sensitive to some colours Y = 0.2125R + 0.7145G + 0.0721B Can store Y plus two colour difference values B-Y and R-Y Strictly use non-linearly scaled Y' and weighted colour differences U and V or C B and C R YUV 176–177

23 © 2004, MacAvon Media Productions 6

24 6

25 6 Instead of considering 24-bit image as array of 3-byte pixels, consider it as 3 arrays of 1-byte pixels i.e. 3 greyscale images, k/a channels, one for each of R, G and B Can adjust levels &c of each channel independently to make colour corrections Actually quite tricky, so Photoshop also provides specialized colour correction tools Channels 179–183

26 © 2004, MacAvon Media Productions 6 Different monitors, scanners, &c have different colour characteristics – different colours correspond to same numerical value Vary with model, age, temperature,… Captured by (ICC) colour profile, which includes values for: R, G and B chromaticities White point (may be given as colour temperature) Gamma Colour Profiles 183–184

27 © 2004, MacAvon Media Productions 6 Software maps between colour spaces of different devices e.g. scanner and monitor, designers's monitor and customer's monitor Use colour profiles of devices to perform the mapping Store input device profile in image file Only works if profiles are accurate, which relies on frequent calibration Colour Management 184–186

28 © 2004, MacAvon Media Productions 6 'Standard' RGB colour space Chromaticities, white point and gamma supposed to be typical of monitors W3C standard Convert image colours to sRGB Should still display well on most monitors without using colour management software Alternatively can colour manage without storing input device profile sRGB 187


Download ppt "Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour."

Similar presentations


Ads by Google