Fix background colors not being applied correctly

This commit is contained in:
Christian Muehlhaeuser
2019-11-30 07:04:48 +01:00
parent 87aaa94b41
commit fca5fd91d6
+1 -1
View File
@@ -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))
}
}