www.pudn.com > XPButton_net.zip > tools.h


//tools.h 
///////////////////////////////////////////////////////////////////////////////// 
typedef DWORD HLSCOLOR; 
#define HLS(h,l,s) ((HLSCOLOR)(((BYTE)(h)|((WORD)((BYTE)(l))<<8))|(((DWORD)(BYTE)(s))<<16))) 
 
/////////////////////////////////////////////////////////////////////////////// 
#define HLS_H(hls) ((BYTE)(hls)) 
#define HLS_L(hls) ((BYTE)(((WORD)(hls)) >> 8)) 
#define HLS_S(hls) ((BYTE)((hls)>>16)) 
 
/////////////////////////////////////////////////////////////////////////////// 
HLSCOLOR RGB2HLS (COLORREF rgb); 
COLORREF HLS2RGB (HLSCOLOR hls); 
 
/////////////////////////////////////////////////////////////////////////////// 
// Performs some modifications on the specified color : luminance and saturation 
COLORREF HLS_TRANSFORM (COLORREF rgb, int percent_L, int percent_S); 
static BYTE _ToRGB (float rm1, float rm2, float rh);