add transparent
This commit is contained in:
parent
2f3402adfb
commit
c9c9042154
1 changed files with 3 additions and 0 deletions
|
@ -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":
|
||||||
|
|
Loading…
Reference in a new issue