Function Reference


_WinAPI_GetGValue

Retrieves an intensity value for the green component of a 32-bit RGB value

#include <WinAPIGdi.au3>
_WinAPI_GetGValue ( $iRGB )

Parameters

$iRGB The color value, in RGB.

Return Value

Returns the intensity of the green component of the specified RGB color.

Example

#include <WinAPIGdi.au3>

Local Const $RGB = 0xFF8040

Local $R = _WinAPI_GetRValue($RGB)
Local $G = _WinAPI_GetGValue($RGB)
Local $B = _WinAPI_GetBValue($RGB)

ConsoleWrite('Red:   0x' & Hex($R, 2) & @CRLF)
ConsoleWrite('Green: 0x' & Hex($G, 2) & @CRLF)
ConsoleWrite('Blue:  0x' & Hex($B, 2) & @CRLF)
ConsoleWrite('---------------' & @CRLF)
ConsoleWrite('RGB:   0x' & Hex(_WinAPI_RGB($R, $G, $B), 6) & @CRLF)