ColorUtilities Class Reference

Helper class for manipulating colors. More...

List of all members.

Static Public Member Functions

static COLORREF alphaBlend (COLORREF color, COLORREF factor)
 Alpha blends color.
static COLORREF darkenColor (COLORREF color, double factor)
 Darkens given color by specified factor.
static COLORREF lightenColor (COLORREF color, double factor)
 Lightens given color by specified factor.


Detailed Description

Helper class for manipulating colors.

Helper class for manipulating COLORREF values, contains static functions for darken and lightening colors etc. COLORREF values (color variables) etc.


Member Function Documentation

static COLORREF alphaBlend ( COLORREF  color,
COLORREF  factor 
) [static]

Alpha blends color.

Factor is in R/255, G/255 and B/255 meaning a value of 255, 255, 255 or 0xFFFFFF will not change change source color at all while a value of 0xFF00FF will keep all read and blue and discard all green.
Returns the manipulated value.

static COLORREF darkenColor ( COLORREF  color,
double  factor 
) [static]

Darkens given color by specified factor.

Factor is in (0..1] range, the higher the factor the more dark the result will be.
Returns the manipulated value

static COLORREF lightenColor ( COLORREF  color,
double  factor 
) [static]

Lightens given color by specified factor.

Factor is in (0..1] range, the higher the factor the more light the result will be.
Returns the manipulated value

Back to SmartWin website
SourceForge.net Logo