Consider the following javascript snippet to setup a vertex buffer and the the pair of vertex/fragment shaders defined in GLSL

Homework 3 – Colors
1. Fill in the blanks below to convert colors between the RGB, HSV, and CMY models:
Red Green Blue Hue Saturation% Value% Cyan Magenta Yellow
(a) 0 0 0 0
(b) 255 255 0 100 100
(c) 0 0 127.5 1 1
(d) 255 255 255
(e) 0 255 255 100 100 1 0 0
(f) 0 100 100
(g) 180 0 100 0
(h) 300 50 0 1
2. Given a color c1 = RGB(25,127,76), which color c2 can you add to get a color pink?
Define (using the RGB model) the pink you are aiming and then the color you
added.
3. Sketch the color models for RGB (cube) and HSV (cone). In both model sketches,
mark (with color name) the position of each of the following colors: black, white,
gray, red, cyan, and yellow.
4. Given the color c1 = RGB(255,255,0), if you decrease the ”saturation” as defined
in HSV until fully desaturated, describe the range of RGB colors you will pass
through, as well as the final result.
5. Linearly interpolate the color halfway between red and blue in each of the follow-
ing color models. (Requires a separate calculation for each subproblem, not just
converting the resulting color.)
(a) RGB
(b) HSV
(c) CMY
6. Considering the results of Question 5. What can be concluded about linear inter-
polation in different color spaces?
7. Consider the following javascript snippet to setup a vertex buffer and the the pair
of vertex/fragment shaders defined in GLSL:
// === VERTEX SHADER
attribute vec2 a_Position;
attribute vec3 a_Color;
varying vec3 v_Color;
main() {
v_Color = a_Color;
1