From 4d25e4ece0b72d240bb2565f8abb7389e650990a Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 23 Nov 2024 21:05:11 -0500 Subject: Preview + Unit-tests for color conversions --- internal/picker/picker.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'internal/picker') diff --git a/internal/picker/picker.go b/internal/picker/picker.go index e3c396e..6c0a79a 100644 --- a/internal/picker/picker.go +++ b/internal/picker/picker.go @@ -62,7 +62,12 @@ func (m Model) GetColor() colors.ColorSpace { Y: m.sliders[2].Val(), K: m.sliders[3].Val(), } - // TODO: HSL + case "HSL": + return colors.HSL{ + H: m.sliders[0].Val(), + S: m.sliders[1].Val(), + L: m.sliders[2].Val(), + } default: // Default to white if we don't know the color space return colors.RGB{ R: 255, -- cgit v1.2.3