diff options
Diffstat (limited to 'internal/color')
| -rw-r--r-- | internal/color/color.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/color/color.go b/internal/color/color.go index 9496a1d..58c040c 100644 --- a/internal/color/color.go +++ b/internal/color/color.go @@ -87,7 +87,7 @@ func nearestANSIBg(index int) int { return fg - 30 + 40 } -func nearestCubeComponent(v int) int { +func nearestCube(v int) int { if v < 48 { return 0 } @@ -107,9 +107,9 @@ func nearestCubeComponent(v int) int { } func NearestXterm256(r, g, b int) int { - ri := nearestCubeComponent(r) - gi := nearestCubeComponent(g) - bi := nearestCubeComponent(b) + ri := nearestCube(r) + gi := nearestCube(g) + bi := nearestCube(b) cubeIdx := 16 + ri*36 + gi*6 + bi cubeDist := colorDist(r, g, b, cubeValues[ri], cubeValues[gi], cubeValues[bi]) @@ -325,10 +325,10 @@ func renderGradient(mode string, spec ColorSpec, text string) string { } func ExpandTags(mode string, text string) string { - return ExpandTagsWithDefault(mode, NoColor(), text) + return ExpandTagsDefault(mode, NoColor(), text) } -func ExpandTagsWithDefault(mode string, def ColorSpec, text string) string { +func ExpandTagsDefault(mode string, def ColorSpec, text string) string { if !strings.Contains(text, "{") { if !def.Empty() { return Render(mode, def, text) |
