void CColour::Lighten(int Amount /* = 1 */) { int h,s,l; GetHSL(h,s,l); l += Amount; if (l > 240) l = 240; SetHSL(h,s,l); }
void CColour::Darken(int Amount /* = 1 */) { int h,s,l; GetHSL(h,s,l); l -= Amount; if (l < 0) l = 0; SetHSL(h,s,l); }
void CColour::GenerateColourRange(int Steps, CUIntArray * pArray) { // Updated colour range using HSL values // Only hue changes int h(0),s(180),l(100); int StepSize = 240 / Steps; for( int i = 0; i < Steps; i++ ) { // this converts the internal rgb value SetHSL(h,s,l); //HSLToRGB(h,s,l,r,g,b); pArray->Add(m_RGB); h += StepSize; } }
void wxColourExt::HslLuminosity(float l) { HslLuminosity(); SetHSL(H0,S0,l); }
void wxColourExt::HslSaturation(float s) { HslSaturation(); SetHSL(H0,s,L0); }
void wxColourExt::HslHue(float h) { HslHue(); SetHSL(h,S0,L0); }