Skip to content

Commit

Permalink
add transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
wcharczuk committed Nov 4, 2023
1 parent 2f3402a commit c9c9042
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drawing/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit c9c9042

Please sign in to comment.