Hallo.
ich hab da mal ein kleines Script welches ausgehend von dem Slider die gewählte Farbe darstellt. Aber wieso werden so wenige angezigt und nicht alle möglichen?
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <Color.au3>
#include <Array.au3>
Global $aiInput[3] = [0, 255, 255]
Global $aiRGB
$hGui = GUICreate("Gui", 800, 400)
For $i = 0 To 255
GUICtrlCreateLabel("", 20 + (3 * $i), 10, 3, 20)
$aiInput[0] = $i
$aiRGB = _ColorConvertHSLtoRGB($aiInput)
$Hex = Hex(Int($aiRGB[0]), 2) & Hex(Int($aiRGB[1]), 2) & Hex(Int($aiRGB[2]), 2)
GUICtrlSetBkColor(-1, "0x" & $Hex)
Next
$hSlider = GUICtrlCreateSlider(11, 40, 785, 20)
GUICtrlSetLimit(-1, 255)
$hLabel = GUICtrlCreateLabel("", 20, 80, 50, 50)
$hInput = GUICtrlCreateInput("", 80, 90, 60, 20)
$aiInput[0] = GUICtrlRead($hSlider)
$aiRGB = _ColorConvertHSLtoRGB($aiInput)
$Hex = Hex(Int($aiRGB[0]), 2) & Hex(Int($aiRGB[1]), 2) & Hex(Int($aiRGB[2]), 2)
GUICtrlSetBkColor($hLabel, "0x" & $Hex)
GUICtrlSetData($hInput, $Hex)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $hSlider
$aiInput[0] = GUICtrlRead($hSlider)
$aiRGB = _ColorConvertHSLtoRGB($aiInput)
$Hex = Hex(Int($aiRGB[0]), 2) & Hex(Int($aiRGB[1]), 2) & Hex(Int($aiRGB[2]), 2)
GUICtrlSetBkColor($hLabel, "0x" & $Hex)
GUICtrlSetData($hInput, $Hex)
EndSwitch
WEnd