检索 32 位 RGB 值的红色成分的亮度值.
#Include <WinAPIEx.au3>
_WinAPI_GetRValue ( $iRGB )
$iRGB | RGB 颜色值. |
返回 RGB 值的红色成分亮度值. |
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $R, $G, $B, $RGB = 0xFF8040
$R = _WinAPI_GetRValue($RGB)
$G = _WinAPI_GetGValue($RGB)
$B = _WinAPI_GetBValue($RGB)
ConsoleWrite('Red: 0x' & Hex($R, 2) & @CR)
ConsoleWrite('Green: 0x' & Hex($G, 2) & @CR)
ConsoleWrite('Blue: 0x' & Hex($B, 2) & @CR)
ConsoleWrite('---------------' & @CR)
ConsoleWrite('RGB: 0x' & Hex(_WinAPI_RGB($R, $G, $B), 6) & @CR)