Revert color changes

This reverts commit 36eaf14857.
This commit is contained in:
nilvng 2025-02-01 11:20:06 +11:00
parent ef3a1ced20
commit 59031c645e
2 changed files with 3 additions and 3 deletions

View file

@ -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)
}

View file

@ -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),
},
{