add transparent

This commit is contained in:
Will Charczuk 2023-11-04 15:44:23 -07:00
parent 2f3402adfb
commit c9c9042154

View file

@ -154,8 +154,11 @@ func ColorFromHex(hex string) Color {
return c return c
} }
// ColorFromKnown returns an internal color from a known (basic) color name.
func ColorFromKnown(known string) Color { func ColorFromKnown(known string) Color {
switch strings.ToLower(known) { switch strings.ToLower(known) {
case "transparent":
return ColorTransparent
case "white": case "white":
return ColorWhite return ColorWhite
case "black": case "black":