From eba8d23a9c980f4560151f613da37b7160cde84c Mon Sep 17 00:00:00 2001 From: Jonah W Date: Wed, 29 May 2024 15:49:24 -0400 Subject: [PATCH] Fixed bug in Hex/MustHex there wasn't actually any way to use mustHex, since you need the hexCode the be of length 6 and 4 at the same time... --- concolor/color.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concolor/color.go b/concolor/color.go index 90af5ea..bb29d54 100644 --- a/concolor/color.go +++ b/concolor/color.go @@ -26,7 +26,7 @@ func RGBA(r, g, b, a byte) Color { // Hex creates a new color from a hex string func Hex(hex string) (Color, error) { - if len(hex) != 6 || len(hex) != 4 { + if len(hex) != 6 && len(hex) != 4 { return Color{}, errors.New("wrong hex color length") }