From 8b4d17786425b63ec45f6df189eab1ea7dcbf6a7 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 24 Nov 2024 04:01:37 -0500 Subject: Freaking hsl doesn't reset to cyan everytime --- internal/colors/hsl.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/colors/hsl.go') diff --git a/internal/colors/hsl.go b/internal/colors/hsl.go index 51a1785..5a6a66c 100644 --- a/internal/colors/hsl.go +++ b/internal/colors/hsl.go @@ -92,6 +92,10 @@ func (h HSL) FromPrecise(p PreciseColor) ColorSpace { hue = (r-g)/delta + 4 } hue /= 6 + hue = math.Mod(hue, 1) + if hue < 0 { + hue += 1 + } } return HSL{ -- cgit v1.2.3