Function Reference


_WinAPI_SwitchColor

Converts a color from BGR to RGB and vice versa

#include <WinAPIGdi.au3>
_WinAPI_SwitchColor ( $iColor )

Parameters

$iColor The color to conversion.

Return Value

Returns the converted color (RGB or BGR - depends on the $iColor value, BGR > RGB > BGR etc).

Example

#include <WinAPIGdi.au3>

Local $iColor = 0xAADDFF

$iColor = _WinAPI_SwitchColor($iColor)
ConsoleWrite('0x' & Hex($iColor, 6) & @CRLF)
$iColor = _WinAPI_SwitchColor($iColor)
ConsoleWrite('0x' & Hex($iColor, 6) & @CRLF)