70 likes | 149 Views
Lab 7 Due Thursday 2 D arrays - embedding graphs in an array. Computer Science Artifacts Abstraction Representations Algorithms sort, search, etc. Announcements & Review. Color. Biology - what you see Subtractive primary colors
E N D
Lab 7 Due Thursday 2 D arrays - embedding graphs in an array Computer Science Artifacts Abstraction Representations Algorithms sort, search, etc. Announcements & Review Lecture 24: Color
Color • Biology - what you see • Subtractive primary colors • making colors from others on paper or mixing paint • Additive primary colors • making colors from others on your computer or TV Lecture 24: Color
Subtractive Color Mixing In printing and painting • RYB - Red Yellow Blue • The RYB model combines Red Yellow Blue to create other colors. • Mixing paints is an absorptive or subtraction process • CMYB - Cyan Magenta Yellow Black Lecture 24: Color
Additive Color Mixing • Screens - TV, computer, cell phone • RGB - Red Green Blue • The RGB additive light model combines Red Green Blue to create other colors. • RGB are the three primary colors in additive light models. • The specific shades are unspecified (and devices implement them differently). • http://mc2.cchem.berkeley.edu/Java/RGB/example1.html Lecture 24: Color
Colors in Java Color constructor: Color(int r, int g, int b) • Each of these integers are between 0 and 255 Color myColor = new Color(100, 140, 180); int red = myColor.getRed(); int RGBvalue = myColor.getRGB(); http://java.sun.com/j2se/1.3/docs/api/java/awt/Color.html Lecture 24: Color
Java Examples in BlueJ • Images as 2D arrays • Playing with colors Lecture 24: Color
More Questions? Lecture 24: Color