00001 #ifndef __COLORUTILS_H__ 00002 #define __COLORUTILS_H__ 00003 00014 #include "IS3DCommon.H" 00015 00016 namespace IS3D { 00017 00018 /* 00019 HLS Vector3 is 00020 Hue: 0.0 - 360 degrees 00021 Lightness: 0.0 - 1.0 00022 Saturation: 0.0 - 1.0 00023 */ 00024 Vector3 rgbToHls( Color3 rgbColor ); 00025 Color3 hlsToRgb( Vector3 hlsColor ); 00026 00027 // Cheap perceptual distance proposed at http://www.compuphase.com/cmetric.htm 00028 double colorDistance( const Color3& rgb1, const Color3& rgb2 ); 00029 } 00030 00031 00032 #endif