Homework 5: Colors in Context

Due: 8 a.m., Friday, September 14
No extensions!

Summary: In this assignment, you will use the transformations you learned in the reading and lab on transforming colors to construct images for exploring colors in context.

Purposes: To practice using transformations. To explore ways to generalize and automate actions. To experiment with ideas from the lecture on color theory.

Expected Time: One to two hours.

Collaboration: You must work in a group of size two or three. You may discuss this assignment and possible solutions with anyone you wish. If you discuss this assignment with people other than group members, make sure to include a citation (e.g., I consulted this person, who helped me do this).

Submitting: Email me your answer. More details below. Each group need submit only one answer.

Warning: So that this exercise is a learning assignment for everyone, I may spend class time publicly critiquing your work.

Contents:


Background

In his guest lecture on Monday, Professor Kluber gave us some terminology for describing relationships between colors: A color scheme can be complementary, analogous, monochromatic, or discordant. Kluber also encouraged us to think about how colors can look different depending on the context in which they appear. At the end of class, we explored one technique for building images that let us test that hypothesis.

Do we know how to compute complements, analogs, and other variants of a color? We know some ways. In particular, we can use the basic color transformations that were discussed in the reading on transforming RGB colors. For example, to compute the complement of a color, subject, we might use (rgb.complement subject).

Assignment

Write Scheme instructions that permit you to view a single color in different contexts. Begin by using define to associate the name subject to the color we will explore. For example, you might write something like

(define subject (cname->rgb "violet"))

Next, write Scheme instructions to create nine different 3x3 images. The center pixel of each image will be subject. In one image, all of the remaining pixels will be the same color. However, that color will differ from image to image.

The colors you should use for the non-center pixels are as follows.

Although you may want to experiment using DrScheme's interactions pane, you should write the final version of your instructions in DrScheme's definitions pane. This way, if you've written your instructions well, you should be able to change the definition of subject, click the Run button, and see the new subject color in all nine different contexts.

Important Evaluation Criteria

I will primarily look at whether your instructions are correct, automatic (that is, you did not need to copy and paste any results), and general (that is, one set of instructions works for any color as subject). I will also look at how you make use of the transformation procedures and how you find a discordant color scheme.

Submitting Your Homework

Please submit this work via email. The email should be titled CSC151 HW5 and should contain the instructions you wrote in the definitions window. Please send your Scheme work as the body of an email message. (You do not need to attach the images you created; I should be able to recreate them by running your code.)


Janet Davis (davisjan@cs.grinnell.edu)

Created September 10, 2007 
Last revised September 11, 2007