#include <GULUTIL.H>
Link against:
egul.lib
class ColorUtils;
Description
Provides static functions for manipulating colours.
Members
Defined in ColorUtils
:
ColorAdjust(TRgb,TInt)
Brightens or darkens a 24-bit colour by a percentage.
CreateGradientBitmapL(CFbsBitmap &,const RWsSession &,TInt,TBitmapOrientation,TRgb,TRgb)
Creates a CFbsBitmap containing a colour gradient.
CreateSystemColorListL(RFs &)
CreateSystemColorListL(RFs &,const CColorList &)
EBitmapOrientationHorizontal
The bitmap is horizontal.
EBitmapOrientationVertical
The bitmap is vertical.
RgbDarkerColor(TRgb,TDisplayMode)
Creates a darker color.
RgbLighterColor(TRgb,TDisplayMode)
Creates a lighter colour.
RgbMidDarkerColor(TRgb,TDisplayMode)
Creates a medium dark version of the colour.
TBitmapOrientation
The orientation of a bitmap.
UpdateSystemColorListL(RFs &,CColorList &)
See also:
Member functions
IMPORT_C static TRgb ColorAdjust(TRgb aColor, TInt aPercentage);
Description
Brightens or darkens a 24-bit colour by a percentage.
If the percentage given is less than 100%, a darker colour will be returned. The algorithm brightens or darkens each of the
R, G and B channels equally.
Parameters
TRgb aColor |
Input colour.
|
TInt aPercentage |
Percentage by which to adjust the input colour.
|
|
Return value
TRgb
|
The adjusted colour.
|
|
CreateGradientBitmapL(CFbsBitmap &,const RWsSession &,TInt,TBitmapOrientation,TRgb,TRgb)
IMPORT_C static void CreateGradientBitmapL(CFbsBitmap &aBitmap, const RWsSession &aWs, TInt aBreadth, TBitmapOrientation aOrientation,
TRgb aStartColor, TRgb aEndColor);
Description
Creates a CFbsBitmap
containing a colour gradient.
To create a gradient, the end colour aEndColor must be different to the start colour aStartingColor.
Parameters
CFbsBitmap &aBitmap |
Bitmap which on return contains the colour gradient.
|
const RWsSession &aWs |
Handle to a window server session.
|
TInt aBreadth |
The width or the height of the bitmap, depending on the orientation.
|
ColorUtils::TBitmapOrientation aOrientation |
The bitmap's orientation (vertical or horizontal).
|
TRgb aStartColor |
The start color.
|
TRgb aEndColor |
The end color.
|
|
CreateSystemColorListL(RFs &)
IMPORT_C static CColorList* CreateSystemColorListL(RFs &aFs);
Description
Parameters
Return value
CreateSystemColorListL(RFs &,const CColorList &)
IMPORT_C static CColorList* CreateSystemColorListL(RFs &aFs, const CColorList &aColorList);
Description
Parameters
Return value
UpdateSystemColorListL(RFs &,CColorList &)
IMPORT_C static void UpdateSystemColorListL(RFs &aFs, CColorList &aColorList);
Description
Parameters
GetRgbDerivedBorderColors(TGulBorder::TColors &,TRgb,TDisplayMode)
IMPORT_C static void GetRgbDerivedBorderColors(TGulBorder::TColors &aBorderColors, TRgb aBackgroundColor, TDisplayMode aMode);
Description
Gets the colours to use for a control's border.
Lighter and darker tones in the border are derived from the specified TRgb
background colour using an algorithm operating on the RGB value of this color or a lookup table, depending on the display
mode aMode. It sets the values of the aBorderColors members iBack, iLight, iMidlight, iMid, and iDark.
Parameters
RgbDarkerColor(TRgb,TDisplayMode)
IMPORT_C static TRgb RgbDarkerColor(TRgb aRgb, TDisplayMode aMode);
Description
Creates a darker color.
Parameters
TRgb aRgb |
The RGB color.
|
TDisplayMode aMode |
The display mode, which indicates the screen output of the colour e.g. 256 colour display mode (8 bpp).
|
|
Return value
RgbMidDarkerColor(TRgb,TDisplayMode)
IMPORT_C static TRgb RgbMidDarkerColor(TRgb aRgb, TDisplayMode aMode);
Description
Creates a medium dark version of the colour.
This function darkens the colour 50% less than ColorUtils::RgbDarkerColor(TRgb,TDisplayMode)
.
Parameters
TRgb aRgb |
The Rgb color.
|
TDisplayMode aMode |
The display mode, which indicates the screen output of the colour e.g. 256 colour display mode (8 bpp).
|
|
Return value
TRgb
|
The medium dark colour.
|
|
RgbLighterColor(TRgb,TDisplayMode)
IMPORT_C static TRgb RgbLighterColor(TRgb aRgb, TDisplayMode aMode);
Description
Creates a lighter colour.
Parameters
TRgb aRgb |
The Rgb colour.
|
TDisplayMode aMode |
The display mode, which indicates the screen output of the colour e.g. 256 colour display mode (8 bpp).
|
|
Return value
TBitmapOrientation
Description
The orientation of a bitmap.