[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

533.0. "How to set text colors using ReGIS" by HANNAH::MESSENGER (Bob Messenger) Tue Apr 04 1989 14:07

This may not be generally known, but there is a difference between the way you
can change your text foreground and background colors using ReGIS commands on
the VT240 and on the VT340; DECterm emulates the VT340.  On the VT240 the
text background color is 0 and the text foreground color is 3, while on the
VT340 and DECterm the text background color is still 0 but the text foreground
color is 7.  These colors are reversed if you've selected "Dark text, light
background", which is the default; in general the darker color is color 0.
(Actually it's a little more complicated than that for the VT340, but that's
another story).

To change your background to red and your foreground to yellow, assuming
you started with the default colors, use this DCL procedure:

	$ esc[0,8] = 27
	$ write sys$output esc, "Pps(m7(r)0(y))", esc, "\"

If you know a little about ReGIS you can also make this more general to
let you specify any ReGIS colors you like (consult a ReGIS manual), e.g.

	$ esc[0,8] = 27
	$ write sys$output esc, "Pps(m7(", p1, ")0(", p2, "))", esc, "\"

To get a red background and yellow foreground you'd say:

	@change_colors r y

To get a salmon background and aquamarine foreground you'd say:

	@change_colors H120L35S25 H260L65S60

Your colors will go back to their initial values if you select "Reset Terminal"
from the Commands menu.

				-- Bob

T.RTitleUserPersonal
Name
DateLines
533.1This is great... Is there a mapping between DECW$RGB_AQUAMARINE and 260,65,60?4933::CARSONKnockwurst & ExcommunicationsThu Jun 29 1989 16:207
	If there is a function of the DECW$RGB_* logicals that maps to 
	H,L,S that REGIS uses or are these totally unrelated numbers?


				- pete

533.2HANNAH::MESSENGERBob MessengerTue Jul 11 1989 02:249
Re: .1

I got the HLS values for aquamarine etc. out of the VT330/VT340 Programmer
Reference Manual.  The DECW$RGB_Aquamarine logical gives RGB (red, green,
blue) rather than HLS (hue, lightness, saturation), although you could
specify the colors in RGB form if you used sixels instead of ReGIS.

				-- Bob

533.3Still ReGIS related problem...KETJE::GHYOOTMeetings are our most useless productTue Sep 05 1989 13:0929
	Re .0

	I'm not familiar with ReGIS, so I was very interested in your
explanation.

	Now, maybe you can help me along with the following problem.

	When calling All-in-1 with the command $ ALLIN1/TERMINAL=VT240 on a
VAXstation 2000/GPX in terminal emulation (VT3xx emulation - DECterm ID), the
result ranges from weird to disgusting, depending on the original color setup
of the station. With respect to your explanation, this makes sense, since
the All-in-1 activation with the above mentioned command seems to generate
something like

	$ write sys$output esc,"PpS(E),esc,"\"

	...in other words, Enter ReGIS, clear screen, and proceed on with this
All-in-1 engine (I added the "leave ReGIS" for test purposes).

	This DCL command generates the kind of color mix you will run away from!

	...trouble is, the Reset Terminal from the Commands menu doesn't reset
the terminal at all!...

	Is this a bug in DECterm, or am I still missing something?

	Thanks,
	/Jean-Michel

533.4Clear and then resetHANNAH::MESSENGERBob MessengerTue Sep 05 1989 21:5512
Re: .3

You need to clear the display (e.g. with Clear Display from the Commands menu)
and then Reset Terminal.

In DECwindows V2, DECterm will emulate 4 colors by default on 4 plane systems.
This means it usually won't have to create a private colormap, and it also
means that the foreground and background colors and 0 and 3, as on a VT240,
rather than 0 and 7.

				-- Bob