ColorAdjustLuma function (shlwapi.h)
Changes the luminance of a RGB value. Hue and saturation are not affected.
Syntax
COLORREF ColorAdjustLuma(
COLORREF clrRGB,
int n,
BOOL fScale
);
Parameters
clrRGB
Type: COLORREF
The initial RGB value.
n
Type: int
The luminance in units of 0.1 percent of the total range. For example, a value of n = 50 corresponds to 5 percent of the maximum luminance.
fScale
Type: BOOL
If fScale is set to TRUE, n specifies how much to increment or decrement the current luminance. If fScale is set to FALSE, n specifies the absolute luminance.
Return value
Type: COLORREF
Returns the modified RGB value.
Remarks
If fScale is set to TRUE, n can range from -1000 to +1000.
If fScale is set to FALSE, n can range from 0 to 1000. Available luminance values range from 0 to a maximum. If the requested value is negative or exceeds the maximum, the luminance will be set to either zero or the maximum value, respectively.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | shlwapi.h |
Library | Shlwapi.lib |
DLL | Shlwapi.dll (version 5.0 or later) |