Skip to content

Commit

Permalink
fix: add missing color types to Color function
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Nov 5, 2024
1 parent f623710 commit c8e32d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions color.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ func Color(c any) color.Color {
switch c := c.(type) {
case nil:
return noColor
case ansi.BasicColor:
return c
case ansi.ExtendedColor:
return c
case ansi.TrueColor:
return c
case string:
if len(c) == 0 {
return noColor
Expand Down

0 comments on commit c8e32d1

Please sign in to comment.