Function Reference


_ColorSetCOLORREF

Returns the COLORREF color

#include <Color.au3>
_ColorSetCOLORREF ( $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 COLORREF color to work with 0x00BBGGRR.
Failure: sets the @error flag to non-zero.
@error: 1 invalid array
2 invalid color value

Remarks

@extended is preserved.

Related

_ColorGetCOLORREF, _ColorSetRGB

Example

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

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

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