summaryrefslogtreecommitdiff
path: root/internal/picker
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-11-23 21:05:11 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-11-23 21:05:11 -0500
commit4d25e4ece0b72d240bb2565f8abb7389e650990a (patch)
tree55af982b45d9ed576871c6f3ccf5f800cddc9b56 /internal/picker
parentb42ab480dd4c4eec83d79bba9400232ddb79f6b1 (diff)
Preview + Unit-tests for color conversions
Diffstat (limited to 'internal/picker')
-rw-r--r--internal/picker/picker.go7
1 files changed, 6 insertions, 1 deletions
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,