[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

terminalview black and white are inverted


According to xterm specs color codes ...

            *Ps* = 3 0  ⇒  Set foreground color to Black.
            *Ps* = 3 1  ⇒  Set foreground color to Red.
            *Ps* = 3 2  ⇒  Set foreground color to Green.
            *Ps* = 3 3  ⇒  Set foreground color to Yellow.
            *Ps* = 3 4  ⇒  Set foreground color to Blue.
            *Ps* = 3 5  ⇒  Set foreground color to Magenta.
            *Ps* = 3 6  ⇒  Set foreground color to Cyan.
            *Ps* = 3 7  ⇒  Set foreground color to White.
            *Ps* = 3 9  ⇒  Set foreground color to default, ECMA-48 3rd.

and then 4 n for background,

TerminalView does black and white inverted. 0 is 7 and 7 is 0

$ echo -e "\e[31;42m Red on Green \e[32;41m Green on Red \e[30;47m
Black on white \e[
40;37m White on black \e[0m"

see pic for result


Some investigating and it looks like it's translating 0 to
TerminalView.Foreground and 7 to Background instead of being white and
black.

Is there a way to force 0 to be black and 7 be white?


It does not seem a common standard practice on all terminals
(checked on mate-terminal and konsole where it actually prints black or white)


Respects

BruceS

Attachment: Untitled.jpg
Description: JPEG image


Follow-Ups:
Re: terminalview black and white are invertedBruce Steers <bsteers4@xxxxxxxxx>