Function Reference

_ColorConvertRGBtoHSL

RGBをHSLに変換します。

#Include <Color.au3>
_ColorConvertRGBtoHSL($avArray)

 

パラメータ

$avArray 各位置にRGB値を格納している配列

 

返し値

成功: 入力したRGB値のHSL値表現を格納した配列。
失敗: 0。@errorを1に設定します。

 

注意

参照: EasyRGB - Color mathematics and conversion formulas.

 

関連

_ColorConvertHSLtoRGB

 


#AutoIt3Wrapper_Au3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <Color.au3>

Opt('MustDeclareVars', 1)

_Main()

Func _Main()
    Local $aiInput[3] = [128, 255, 128], $aiHSL, $aiRGB, $sOutput
   
    $aiHSL = _ColorConvertRGBtoHSL($aiInput)
    $aiRGB = _ColorConvertHSLtoRGB($aiHSL)

    $sOutput &= StringFormat("| R: %.3f" & @TAB & "| H: %.3f" & @TAB & "| R: %.3f" & @CRLF, $aiInput[0], $aiHSL[0], $aiRGB[0])
    $sOutput &= StringFormat("| G: %.3f" & @TAB & "| S: %.3f" & @TAB & "| G: %.3f" & @CRLF, $aiInput[1], $aiHSL[1], $aiRGB[1])
    $sOutput &= StringFormat("| B: %.3f" & @TAB & "| L: %.3f" & @TAB & "| B: %.3f" & @CRLF, $aiInput[2], $aiHSL[2], $aiRGB[2])
    MsgBox(0, "AutoIt", $sOutput)
EndFunc   ;==>_Main