ECE160 Project #1
Due April 30

In this project you are asked to map RGB colors to culture colors. Given an RGB color, your algorithm decides to which of the eleven culture colors (i.e., black, gray, white, red, yellow, green, blue, brown, purple, pink, and orange) the RGB color belongs. For instance, navy blue is blue and violet is purple.

There are more than one way to do the mapping. We suggest that you work in the HSV space. Since the HSV space is closer mapped to human color perception, you may be able to divide the HSV space into eleven regions, each represents a culture color.

The following design issues need to be carefully considered:

More specifically, you need to implement a subroution int RGB_to_CC(int r, int g, int b). The input parameters are r, g, b values, ranging from 0 to 255. The output is an integer value ranging from 0 to 11. A header file rgbcc.h that contains some definitions is available to download.