Function Reference


_ColorSetRGB

Returns the RGB color

#include <Color.au3>
_ColorSetRGB ( $aColor )

Parameters

$aColor an array of values in the range 0-255:
[0] Red component color
[1] Green component color
[2] Blue component color

Return Value

Success: the RGB color to work with 0x00RRGGBB.
Failure: sets the @error flag to non-zero.
@error: 1 invalid array
2 invalid color value

Remarks

@extended is preserved.

Related

_ColorGetRGB

Example

#include <Color.au3>
#include <MsgBoxConstants.au3>

Local $aColor[3] = [0x80, 0x90, 0xff]

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