Funktionsreferenz

_ColorConvertHSLtoRGB

Wandelt Farbwerte vom HSL-System ins RGB-Format um.

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

 

Parameter

$avArray Ein Array, das die HSL-Farbwerte an der jeweiligen Position enthält.

 

Rückgabewert

Erfolg: Das Array enthält die RGB-Werte für die übergebenen HSL-Werte.
Fehler: 0, setzt @error auf 1

 

Bemerkungen

Siehe: EasyRGB - Mathematik der Farben und Formeln zur Konvertierung (englisch).

 

Verwandte Funktionen

_ColorConvertRGBtoHSL

 

Beispiel


#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] = [120, 180, 160], $aiHSL, $aiRGB, $sOutput
   
    $aiRGB = _ColorConvertHSLtoRGB($aiInput)
    $aiHSL = _ColorConvertRGBtoHSL($aiRGB)

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