Color Model Program

Begin with the Matrix class from the Java ray tracer, or the the JAMA's Matrix class useful for most of these conversion methods. The JavaDoc for the JAMA Matrix class is available here.

For this assignment, you will implement conversion method from and to RGB and:

The L* in both these CIE color models is the same. It represents lightness, and ranges from 0 (black) to 100 (white). For CIE L*a*b*, the a* axis runs between red (positive) and green (negative), whereas the b* axis runs between yellow (positive) and blue (negative). For CIE L*u*v*, the u* and v* values are derived directly from the x and y values in CIE XYZ. You can read more about CIE L*u*v* and CIE L*a*b* at Wikipedia.

For all four methods, you will want to convert first to CIE XYZ before converting to the target color space. In addition, all the equations refer to a reference white value, which varies based on viewing angle. You should use the values: