The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:procedure RGBtoCMY (R, G, B: byte; var Cyan, Magenta, Yellow: double);

The function RGBtoCMY transforms a color defined in the RGB color space by the parameters r (red, valid range: 0..255), g (green, valid range: 0..255), and b (blue, valid range: 0..255) into the CMY color space (cyan, magenta, and yellow). The variable parameters Cyan, Magenta, and Yellow return values in the range between 0 and 1.0.

Hint: The CMY color system describes a color based on the amounts of the base colors cyan, magenta, and yellow. Thus, a particular color has three coordinates [C,M,Y], with the coordinates lying between 0.0 and 1.0. Please note that the CMY model is a subtractive model, thus black is [1,1,1] and white is [0,0,0].

Last Update: 2014-Aug-13