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.... |
Home BasePack SDLColors Class TColorArray Methods ColorToIndex | |||||||||
See also: RGBColorDistance | |||||||||
ColorToIndex |
|||||||||
The method ColorToIndex searches through the entire color array to find the color most similar to cl. The variable parameter dist returns the distance between the color cl and the most similar color found in the color array. It may assume any value between 0.0 (identical colors) and 1.0 (maximum difference, which is equal to the distance between black and white). The function returns the index of the most similar color.
|