Function Reference


_ColorGetRGB

Returns an array containing RGB values in their respective positions.

#include <Color.au3>
_ColorGetRGB($nColor)

Parameters

$nColor The RGB color to work with (0x00RRGGBB).

Return Value

Success: an array of values in the range 0-255:
[0] Red component color
[1] Green component color
[2] Blue component color
Failure: set @error to 1

Remarks

None.

Related

_ColorSetRGB, _ColorGetRed, _ColorGetGreen, _ColorGetBlue

Example


#include <Color.au3>

Local $nColor = 0x8090ff

Local $aColor = _ColorGetRGB($nColor)
MsgBox(4096, "AutoIt", "Color=" & Hex($nColor) & @CRLF & " Red=" & Hex($aColor[0], 2) & " Blue=" & Hex($aColor[1], 2) & " Green=" & Hex($aColor[2], 2))