Color: Assigments


Required

1 - Get the library libcolor.a . Save the file color.tgz , decompress it with gunzip and use tar to create the directory "./i3d/base/color" . Compile and install the library.

2 - Write a program to construct a color table with 256 colors. The program should implement, at least two different discretization methods (2.1) and (2.2) of the RGB color solid.

3 - Using the gp library, write a program to display the color tables constructed in assgn. 2.
Compare and evaluate the solutions 2.1 and 2.2.

4 - Design and implement, using the gp library, a color selection widget.


Optional

5 - Write a function that, given an arbitrary RGB color, finds the best match available in the color map.

6 - Write a program to convert between RGB, YIQ and HSV color spaces.


Challenge

7 - Write a program to detect NTSC "Hot Colors", and change it to a 'safe' color.

The expression "hot" color is used to designate a RGB color that cannot be correctly encoded in NTSC because of limitations of the television system. Such colors are high intensity, high saturation RGB values that, when converted to a composite video signal, result in voltages above the maximum limits of the hardware.

This problem can be formulated more precisely as follows: