From c8e32d1b422c97cd63cc0ef403f52119956bccc9 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 5 Nov 2024 09:53:28 -0500 Subject: [PATCH] fix: add missing color types to Color function --- color.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/color.go b/color.go index cacd2539..3bf1f2df 100644 --- a/color.go +++ b/color.go @@ -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