From 59031c645ec004809fdfd41a8a110894a9368ec7 Mon Sep 17 00:00:00 2001 From: nilvng Date: Sat, 1 Feb 2025 11:20:06 +1100 Subject: [PATCH] Revert color changes This reverts commit 36eaf14857dc8110c47b3d91b823589771aae305. --- pkg/iostreams/color.go | 2 +- pkg/iostreams/color_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/iostreams/color.go b/pkg/iostreams/color.go index 33df6bddf..c8d48168f 100644 --- a/pkg/iostreams/color.go +++ b/pkg/iostreams/color.go @@ -252,5 +252,5 @@ func (c *ColorScheme) HexToRGB(hex string, x string) string { r, _ := strconv.ParseInt(hex[0:2], 16, 64) g, _ := strconv.ParseInt(hex[2:4], 16, 64) b, _ := strconv.ParseInt(hex[4:6], 16, 64) - return fmt.Sprintf("\033[38;2;%d;%d;%dm%s\033[39m", r, g, b, x) + return fmt.Sprintf("\033[38;2;%d;%d;%dm%s\033[0m", r, g, b, x) } diff --git a/pkg/iostreams/color_test.go b/pkg/iostreams/color_test.go index f3370da29..59fea53ed 100644 --- a/pkg/iostreams/color_test.go +++ b/pkg/iostreams/color_test.go @@ -18,7 +18,7 @@ func TestColorFromRGB(t *testing.T) { name: "truecolor", hex: "fc0303", text: "red", - wants: "\033[38;2;252;3;3mred\033[39m", + wants: "\033[38;2;252;3;3mred\033[0m", cs: NewColorScheme(true, true, true), }, { @@ -62,7 +62,7 @@ func TestHexToRGB(t *testing.T) { name: "truecolor", hex: "fc0303", text: "red", - wants: "\033[38;2;252;3;3mred\033[39m", + wants: "\033[38;2;252;3;3mred\033[0m", cs: NewColorScheme(true, true, true), }, {