Function Reference


_WinAPI_RGB

Creates a RGB color value based on red, green, and blue components

#include <WinAPIGdi.au3>
_WinAPI_RGB ( $iRed, $iGreen, $iBlue )

Parameters

$iRed The intensity of the red color.
$iGreen The intensity of the green color.
$iBlue The intensity of the blue color.

Return Value

Returns the resultant 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)