docs(color): use proper spelling
Some checks failed
Azure Static Web Apps CI/CD / Build and Deploy (push) Has been cancelled
Release / changelog (push) Has been cancelled
Release / artifacts (push) Has been cancelled
Release / msi (arm64) (push) Has been cancelled
Release / msi (x64) (push) Has been cancelled
Release / msi (x86) (push) Has been cancelled
Release / release (push) Has been cancelled

This commit is contained in:
vil02 2025-01-20 21:57:16 +01:00 committed by Jan De Dobbeleer
parent 2f716f531a
commit da9bb791d3
2 changed files with 3 additions and 3 deletions

View file

@ -25,11 +25,11 @@ func TestGetAnsiFromColorString(t *testing.T) {
{Case: "Invalid background", Expected: emptyColor, Color: "invalid", Background: true},
{Case: "Invalid background", Expected: emptyColor, Color: "invalid", Background: false},
{Case: "Hex foreground", Expected: Ansi("38;2;170;187;204"), Color: "#AABBCC", Background: false},
{Case: "Hex backgrond", Expected: Ansi("48;2;170;187;204"), Color: "#AABBCC", Background: true},
{Case: "Hex background", Expected: Ansi("48;2;170;187;204"), Color: "#AABBCC", Background: true},
{Case: "Base 8 foreground", Expected: Ansi("31"), Color: "red", Background: false},
{Case: "Base 8 background", Expected: Ansi("41"), Color: "red", Background: true},
{Case: "Base 16 foreground", Expected: Ansi("91"), Color: "lightRed", Background: false},
{Case: "Base 16 backround", Expected: Ansi("101"), Color: "lightRed", Background: true},
{Case: "Base 16 background", Expected: Ansi("101"), Color: "lightRed", Background: true},
{Case: "Non true color TERM", Expected: Ansi("38;5;146"), Color: "#AABBCC", Color256: true},
}
for _, tc := range cases {

View file

@ -11,7 +11,7 @@ type Palette map[Ansi]Ansi
const (
paletteKeyPrefix = "p:"
paletteKeyError = "palette: requested color %s does not exist in palette of colors %s"
paletteMaxRecursionDepth = 3 // allows 3 or less recusive resolutions
paletteMaxRecursionDepth = 3 // allows 3 or less recursive resolutions
paletteRecursiveKeyError = "palette: recursive resolution of color %s returned palette reference %s and reached recursion depth %d"
)