[comp.sys.att] 386 console & color

les@chinet.chi.il.us (Leslie Mikesell) (05/07/89)

Is there a way to set the background color on the console under AT&T
unix for the 386 (monitor happens to be the 750 EGA version).  I don't
mean the background of the printed characters - I mean the background
as in everything that is normally black when the screen is in the normal
white on black mode.  I'd really prefer to have the screen display
white on a blue background but only if the unprinted areas are blue also.

Les Mikesell

wtm@neoucom.UUCP (Bill Mayhew) (05/09/89)

I believe that ansi escape code processing is built into the
console driver.  Try sending:  \033[44;37;1m
That should give you bright white on a blue background.   Send the
string, then do a clear to paint the attribute over the whole
screen.  I am reasonably sure this works on the console driver on
the 6386.  I tried it on the Xenix system sitting next to me and it
works.  Of course, the \033 is the meta representation for the
escape character.

For fun, here are the ansi set graphic rendition codes.  The
generic form of the command is:  \033[nn;mm;...;ppm
You may include as many modifiers as you'd like.  A lower case m
terminates the escape sequence.

0		All attributes off
1		Bold on
3		Swap foreground and background
4		Underline on
5		Blink on
7		Reverse video on
8		Concealed on
30		Black foreground
31		Red foreground
32		Green foreground
33		Yellow foreground
34		Blue foreground
35		Magenta foreground
36		Cyan foreground
37		White foreground
40		Black background
41		Red background
42		Green background
43		Yellow background
44		Blue background
45		Magenta background
46		Cyan background
47		White background


Bill
[44;37;1mwtm@impulse.UUCP[0m

les@chinet.chi.il.us (Leslie Mikesell) (05/10/89)

In article <1619@neoucom.UUCP> wtm@neoucom.UUCP (Bill Mayhew) writes:
>
>I believe that ansi escape code processing is built into the
>console driver.  Try sending:  \033[44;37;1m
>That should give you bright white on a blue background.   Send the
>string, then do a clear to paint the attribute over the whole
>screen.  I am reasonably sure this works on the console driver on
>the 6386.  I tried it on the Xenix system sitting next to me and it
>works.  Of course, the \033 is the meta representation for the
>escape character.

Thanks, but what I get is white characters on a blue background for
each character that is printed.  Clearing the screen makes it black
and the ends of lines past the printed characters are black.  Is
an error in the handling of background color or is that part "undefined"?
BTW, SVr3.2 has color built into terminfo so the codes can be
generated with "tput setb n" where n is a digit.  If it weren't for the
problem of non-displayed areas I would just modify the terminfo entry
to make screen initialization set the color I want.

Les Mikesell