[Coco] Colors.s - Help for selecting OS-9 Screen Colors that can be read.

Robert Gault robert.gault at worldnet.att.net
Fri Jan 8 23:20:23 EST 2010


Stephen H. Fischer wrote:
> Hi,
>
> I finally found one of the two files I was looking for. I need to look
> at it more closely, it appears to not do what is wanted currently.
>
> The Shell Script I used in selecting screen colors is here. When you
> have several windows on the same screen it is most useful to use
> different background colors for each. Then the foreground color must be
> chosen so the text can be read. Your "good", "fair', "poor" ratings may
> be different.
>
> - - - - - - - Cut Here - - - - - - - - - - - - -
> *colors.s 89/01/31
> *
> * 1b 30 - restore palette settings.
> * 1b 31 - change palette register.
> * 1b 32 - set foreground color.
> * 1b 33 - set background color
> * 1b 34 - set border color.
> *
> * DEFAULT COLORS
> *
> * 0,08 white 4,12 red
> * 1,09 blue 5,13 yellow
> * 2,10 black 6,14 magenta
> * 3,11 green 7,15 cyan
> * -------------------------------
> *
> display 0d
> display 1b 33 0 ;* white
> display 20 1b 32 0 20 ; prompt ---- ;* white
> display 20 1b 32 1 20 ; prompt good ;* blue
> display 20 1b 32 2 20 ; prompt good ;* black
> display 20 1b 32 3 20 ; prompt poor ;* green
> display 20 1b 32 4 20 ; prompt good ;* red
> display 20 1b 32 5 20 ; prompt poor ;* yellow
> display 20 1b 32 6 20 ; prompt good ;* magenta
> display 20 1b 32 7 20 ; prompt poor ;* cyan
> display 1b 33 1 ;* blue
> display 20 1b 32 0 20 ; prompt good ;* white
> display 20 1b 32 1 20 ; prompt ---- ;* blue
> display 20 1b 32 2 20 ; prompt poor ;* black
> display 20 1b 32 3 20 ; prompt good ;* green
> display 20 1b 32 4 20 ; prompt fair ;* red
> display 20 1b 32 5 20 ; prompt good ;* yellow
> display 20 1b 32 6 20 ; prompt good ;* magenta
> display 20 1b 32 7 20 ; prompt good ;* cyan
> display 1b 33 2 ;* black
> display 20 1b 32 0 20 ; prompt good ;* white
> display 20 1b 32 1 20 ; prompt good ;* blue
> display 20 1b 32 2 20 ; prompt ---- ;* black
> display 20 1b 32 3 20 ; prompt good ;* green
> display 20 1b 32 4 20 ; prompt good ;* red
> display 20 1b 32 5 20 ; prompt good ;* yellow
> display 20 1b 32 6 20 ; prompt good ;* magenta
> display 20 1b 32 7 20 ; prompt good ;* cyan
> display 1b 33 3 ;* green
> display 20 1b 32 0 20 ; prompt poor ;* white
> display 20 1b 32 1 20 ; prompt poor ;* blue
> display 20 1b 32 2 20 ; prompt good ;* black
> display 20 1b 32 3 20 ; prompt ---- ;* green
> display 20 1b 32 4 20 ; prompt poor ;* red
> display 20 1b 32 5 20 ; prompt poor ;* yellow
> display 20 1b 32 6 20 ; prompt poor ;* magenta
> display 20 1b 32 7 20 ; prompt poor ;* cyan
> display 1b 33 4 ;* red
> display 20 1b 32 0 20 ; prompt good ;* white
> display 20 1b 32 1 20 ; prompt poor ;* blue
> display 20 1b 32 2 20 ; prompt good ;* black
> display 20 1b 32 3 20 ; prompt poor ;* green
> display 20 1b 32 4 20 ; prompt ---- ;* red
> display 20 1b 32 5 20 ; prompt good ;* yellow
> display 20 1b 32 6 20 ; prompt poor ;* magenta
> display 20 1b 32 7 20 ; prompt fair ;* cyan
> display 1b 33 5 ;* yellow
> display 20 1b 32 0 20 ; prompt poor ;* white
> display 20 1b 32 1 20 ; prompt good ;* blue
> display 20 1b 32 2 20 ; prompt good ;* black
> display 20 1b 32 3 20 ; prompt poor ;* green
> display 20 1b 32 4 20 ; prompt good ;* red
> display 20 1b 32 5 20 ; prompt ---- ;* yellow
> display 20 1b 32 6 20 ; prompt fair ;* magenta
> display 20 1b 32 7 20 ; prompt poor ;* cyan
> display 1b 33 6 ;* magenta
> display 20 1b 32 0 20 ; prompt good ;* white
> display 20 1b 32 1 20 ; prompt poor ;* blue
> display 20 1b 32 2 20 ; prompt good ;* black
> display 20 1b 32 3 20 ; prompt poor ;* green
> display 20 1b 32 4 20 ; prompt good ;* red
> display 20 1b 32 5 20 ; prompt fair ;* yellow
> display 20 1b 32 6 20 ; prompt ---- ;* magenta
> display 20 1b 32 7 20 ; prompt poor ;* cyan
> display 1b 33 7 ;* cyan
> display 20 1b 32 0 20 ; prompt poor ;* white
> display 20 1b 32 1 20 ; prompt good ;* blue
> display 20 1b 32 2 20 ; prompt good ;* black
> display 20 1b 32 3 20 ; prompt poor ;* green
> display 20 1b 32 4 20 ; prompt fair ;* red
> display 20 1b 32 5 20 ; prompt poor ;* yellow
> display 20 1b 32 6 20 ; prompt poor ;* magenta
> display 20 1b 32 7 20 ; prompt ---- ;* cyan
> display 1b 32 0 1b 33 1
> * end of colors.s
> - - - - - - - Cut Here - - - - - - - - - - - - -
> SHF
>

The commands should work if you remove the enclosing 20's. There is no 
reason for the presence of the 20 unless there are other numbers missing.
5 20 turn off cursor
1f 20 reverse video
1b 20 DWSet



More information about the Coco mailing list