From c9c904215494e8db2f55863b1855bb0a09ef58d8 Mon Sep 17 00:00:00 2001 From: Will Charczuk Date: Sat, 4 Nov 2023 15:44:23 -0700 Subject: [PATCH] add transparent --- drawing/color.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drawing/color.go b/drawing/color.go index 09f808b..4b865d7 100644 --- a/drawing/color.go +++ b/drawing/color.go @@ -154,8 +154,11 @@ func ColorFromHex(hex string) Color { return c } +// ColorFromKnown returns an internal color from a known (basic) color name. func ColorFromKnown(known string) Color { switch strings.ToLower(known) { + case "transparent": + return ColorTransparent case "white": return ColorWhite case "black":