diff --git a/src/garden/color.cljc b/src/garden/color.cljc index 96fe736..cd5aa19 100644 --- a/src/garden/color.cljc +++ b/src/garden/color.cljc @@ -245,7 +245,7 @@ (defn hsla->hex "Convert an HSLA color map to a hexadecimal string." [color] - (-> color hsla->rgba rgb->hex)) + (-> color hsla->rgba rgba->hex)) (defn hex->hsl "Convert a hexadecimal color to an HSL color." diff --git a/test/garden/color_test.cljc b/test/garden/color_test.cljc index 4533f8b..c4ab0b4 100644 --- a/test/garden/color_test.cljc +++ b/test/garden/color_test.cljc @@ -107,7 +107,13 @@ (color/as-hex rgba-red) hexa-red (color/as-hex rgba-green) hexa-green (color/as-hex rgba-blue) hexa-blue - (color/as-hex rgba-white) hexa-white))) + (color/as-hex rgba-white) hexa-white + + (color/as-hex hsla-black) hexa-black + (color/as-hex hsla-red) hexa-red + (color/as-hex hsla-green) hexa-green + (color/as-hex hsla-blue) hexa-blue + (color/as-hex hsla-white) hexa-white))) (deftest color-math-test (testing "color+"