From fca5fd91d60f1faa0e62c4a7cbdb4e2516f936f7 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 30 Nov 2019 07:03:39 +0100 Subject: [PATCH] Fix background colors not being applied correctly --- baselement.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baselement.go b/baselement.go index 2c755be..c299934 100644 --- a/baselement.go +++ b/baselement.go @@ -26,7 +26,7 @@ func (e *BaseElement) renderText(w io.Writer, rules *ElementStyle, s string) { if rules.BackgroundColor != "" { i, err := strconv.Atoi(rules.BackgroundColor) if err == nil && i >= 0 && i <= 255 { - out = out.Index(uint8(i)) + out = out.BgIndex(uint8(i)) } }