Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.

Similar presentations


Presentation on theme: "Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College."— Presentation transcript:

1 Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College PowerPoint Instructor’s Resource

2 Color and Blending Specifying and working with color in your images

3 Color is Fundamental in Graphics Having full-capability color available everywhere was a great breakthrough in computing when it finally happened In order to use color, we need to know how to specify it and how to work with it We also need to know how color affects the way our audience understands our images

4 The Human Visual System Our eyes have two main kinds of cells involved in vision –Rods -- sense luminance or brightness –Cones -- sense chroma or color Three kinds of photosensitive chemicals in cones Generally these are sensitive to red, green, and blue light wavelengths

5 Computer Graphics Simulates These Capabilities Images are created using red, green, and blue primaries Primaries may be phosphors in screen or film Primaries may be created by complements in print –See the hardcopy chapter for more details

6 The RGB Color Model Colors are specified by naming their red, green, and blue components These are usually taken to be relative components with real-valued numbers in [0,1] each Devices will have a more discrete color space, but the [0,1] space is mapped to this as needed

7 The RGB Color Space It is convenient to visualize RGB space in terms of the RGB Cube, with pure primaries at the vertices

8 Color and Luminance It can be important to think of the luminance of a color as well as the chroma (RGB values) of the color Luminance can be approximated by 0.30*red + 0.59*green + 0.11*blue If a viewer has color deficiencies, he can usually distinguish color by luminance

9 Luminance Example The RGB cube clipped by a plane, shown in both color and grayscale The grayscale conversion is computer- based, not visually-based; is it right?

10 Other Color Models: HSV Hue - Saturation - Value : cone model Hue = angle; saturation = radius; value = height Views from side, top, and bottom

11 Other Color Models: HLS Hue - Lightness - Saturation double cone model with hue = angle; lightness = height; saturation = radius; Views from red, green, and blue sides

12 Emissive vs Transmissive Colors Emissive colors are from screen Transmissive colors are from inks RGB emissive model (left) CMYK transmissive model (right)

13 Color Depth Depth is number of bits to store color Current standard is at least 8 bits/color With smaller color depth, you can get more mach banding (some may always be there!) See them in figure

14 Color Gamut The color gamut is the range of colors that can be created compared to the number that can be seen The CIE color space helps to see the gamut of any device (see triangle)

15 Color Blending and the Alpha Channel The RGB color model is extended to the RGBA model by adding an alpha value This value represents the proportion of color this contributes when it is blended with other colors 1 = complete coverage; 0 = no coverage Blending models transparency but does not actually provide it

16 Creating Transparency with Blending Takes Some Work (left) Three planes with alpha =.5, order B-G-R (middle) Three planes as above, no depth testing (right) Three planes as at top, varying alpha values But if you divide each plane into four parts and draw them back to front, you get an accurate model of transparency

17 Color for Visual Communication Color can be used in many ways Highlight color (left) and background color (right) are two important ones

18 Color for Visual Communication (2) Pseudocolor is another very important use of color for communication Use color to show the value of data

19 Pseudocolor and Color Ramps Create a color ramp by associating values of each of R-G-B with values in [0,1] For example: –From 0 to.30, increase red to go from (0,0,0) to (1,0,0) –From.30 to.89, increase green to go from (1,0,0) to (1,1,0) –From.89 to 1.0, increase blue to go from (1,1,0) to (1,1,1) This is the uniform-luminance color ramp

20 Pseudocolor and Color Ramps Comparing color ramps –rainbow (left) vs uniform-luminance (right)

21 Color and Shape You can use either color or shape to encode values (or both) Compare these examples: which works?

22 Other Color Issues Color has some very specific meanings to people You need to respect those if you want your images to communicate well to a number of audiences Meanings can be professional, cultural, or even emotional

23 Perception Issues With Color There are problems with sharp contrasts in color along edges These come from the way our vision system works


Download ppt "Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College."

Similar presentations


Ads by Google