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":