diff options
Diffstat (limited to 'src/display/term.nim')
-rw-r--r-- | src/display/term.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/display/term.nim b/src/display/term.nim index 80fa88f9..42946dcc 100644 --- a/src/display/term.nim +++ b/src/display/term.nim @@ -274,6 +274,12 @@ proc processFormat*(term: Terminal, format: var Format, cellf: Format): string = var cellf = cellf case term.colormode of ANSI: + if not cellf.bgcolor.rgb and cellf.bgcolor.color > 15: + let color = cellf.bgcolor.eightbit + cellf.bgcolor = cellColor(eightBitToRGB(color)) + if not cellf.fgcolor.rgb and cellf.fgcolor.color > 15: + let color = cellf.fgcolor.eightbit + cellf.fgcolor = cellColor(eightBitToRGB(color)) if cellf.bgcolor.rgb: let color = approximateANSIColor(cellf.bgcolor.rgbcolor) if color == ANSI_BLACK: |