  Writing DECterm Text in Color? 
 The Question is:
 
I have a request before me to change a "BOLD" character from being just bold
to BOLD and a different color.  We are running Motif 1.2-3 on OpenVMS alpha
6.2-1H3.  I also have some machines running Motif 1.2-4.
 
What escape sequence would be used to change the way a BOLD character is
displayed?  Can this same change be applied to BLINK and ITALICs?
 
Peter Zeiszler
r3729z@email.sps.mot.com
 
 
 The Answer is:
$!
$!      Copyright 1991, Digital Equipment Corporation
$!
$!      DCL procedure to write in all possible ANSI color text combinations.
$!
$!      Author:  Eric Osman   9-Apr-1991
$!
$ set = "set"
$ set symbol/scope=(nolocal,noglobal)
$ on warning then exit
$ w = "write sys$output e,"
$ e = ""
$ e[0,8] = 27
$ w "[39;49m(black on red)        ",e,"[41;30m&lt;ESC&gt;[41;30m black on red       ",e,"[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(black on green)      ",e,"[42;30m&lt;ESC&gt;[42;30m black on green     ",e,"[7m...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(black on yellow)     ",e,"[43;30m&lt;ESC&gt;[43;30m black on yellow    ",e,"[7m...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(black on blue)       ",e,"[44;30m&lt;ESC&gt;[44;30m black on blue      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(black on magenta)    ",e,"[45;30m&lt;ESC&gt;[45;30m black on magenta   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(black on cyan)       ",e,"[46;30m&lt;ESC&gt;[46;30m black on cyan      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(black on white)      ",e,"[47;30m&lt;ESC&gt;[47;30m black on white     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(black on default)    ",e,"[49;30m&lt;ESC&gt;[49;30m black on default   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(red on red)          ",e,"[41;31m&lt;ESC&gt;[41;31m red on red         ",e,"[7m              ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(red on green)        ",e,"[42;31m&lt;ESC&gt;[42;31m red on green       ",e,"[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(red on yellow)       ",e,"[43;31m&lt;ESC&gt;[43;31m red on yellow      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(red on blue)         ",e,"[44;31m&lt;ESC&gt;[44;31m red on blue        ",e,"[7m             ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(red on magenta)      ",e,"[45;31m&lt;ESC&gt;[45;31m red on magenta     ",e,"[7m...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(red on cyan)         ",e,"[46;31m&lt;ESC&gt;[46;31m red on cyan        ",e,"[7m             ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(red on white)        ",e,"[47;31m&lt;ESC&gt;[47;31m red on white       ",e,"[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(red on default)      ",e,"[49;31m&lt;ESC&gt;[49;31m red on default     ",e,"[7m...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(green on red)        ",e,"[41;32m&lt;ESC&gt;[41;32m green on red       ",e, "[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(green on green)      ",e,"[42;32m&lt;ESC&gt;[42;32m green on green     ",e,"[7m...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(green on yellow)     ",e,"[43;32m&lt;ESC&gt;[43;32m green on yellow    ",e,"[7m...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(green on blue)       ",e,"[44;32m&lt;ESC&gt;[44;32m green on blue      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(green on magenta)    ",e,"[45;32m&lt;ESC&gt;[45;32m green on magenta   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(green on cyan)       ",e,"[46;32m&lt;ESC&gt;[46;32m green on cyan      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(green on white)      ",e,"[47;32m&lt;ESC&gt;[47;32m green on white     ",e,"[7m...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(green on default)    ",e,"[49;32m&lt;ESC&gt;[49;32m green on default   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(yellow on red)       ",e,"[41;33m&lt;ESC&gt;[41;33m yellow on red      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(yellow on green)     ",e,"[42;33m&lt;ESC&gt;[42;33m yellow on green    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(yellow on yellow)    ",e,"[43;33m&lt;ESC&gt;[43;33m yellow on yellow   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(yellow on blue)      ",e,"[44;33m&lt;ESC&gt;[44;33m yellow on blue     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(yellow on magenta)   ",e,"[45;33m&lt;ESC&gt;[45;33m yellow on magenta  ",e,"[7m       ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(yellow on cyan)      ",e,"[46;33m&lt;ESC&gt;[46;33m yellow on cyan     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(yellow on white)     ",e,"[47;33m&lt;ESC&gt;[47;33m yellow on white    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(yellow on default)   ",e,"[49;33m&lt;ESC&gt;[49;33m yellow on default  ",e,"[7m       ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(blue on red)         ",e,"[41;34m&lt;ESC&gt;[41;34m blue on red        ",e,"[7m             ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(blue on green)       ",e,"[42;34m&lt;ESC&gt;[42;34m blue on green      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(blue on yellow)      ",e,"[43;34m&lt;ESC&gt;[43;34m blue on yellow     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(blue on blue)        ",e,"[44;34m&lt;ESC&gt;[44;34m blue on blue       ",e,"[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(blue on magenta)     ",e,"[45;34m&lt;ESC&gt;[45;34m blue on magenta    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(blue on cyan)        ",e,"[46;34m&lt;ESC&gt;[46;34m blue on cyan       ",e,"[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(blue on white)       ",e,"[47;34m&lt;ESC&gt;[47;34m blue on white      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(blue on default)     ",e,"[49;34m&lt;ESC&gt;[49;34m blue on default    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(magenta on red)      ",e,"[41;35m&lt;ESC&gt;[41;35m magenta on red     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(magenta on green)    ",e,"[42;35m&lt;ESC&gt;[42;35m magenta on green   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(magenta on yellow)   ",e,"[43;35m&lt;ESC&gt;[43;35m magenta on yellow  ",e,"[7m       ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(magenta on blue)     ",e,"[44;35m&lt;ESC&gt;[44;35m magenta on blue    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(magenta on magenta)  ",e,"[45;35m&lt;ESC&gt;[45;35m magenta on magenta ",e,"[7m      ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(magenta on cyan)     ",e,"[46;35m&lt;ESC&gt;[46;35m magenta on cyan    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(magenta on white)    ",e,"[47;35m&lt;ESC&gt;[47;35m magenta on white   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(magenta on default)  ",e,"[49;35m&lt;ESC&gt;[49;35m magenta on default ",e,"[7m      ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(cyan on red)         ",e,"[41;36m&lt;ESC&gt;[41;36m cyan on red        ",e,"[7m             ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(cyan on green)       ",e,"[42;36m&lt;ESC&gt;[42;36m cyan on green      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(cyan on yellow)      ",e,"[43;36m&lt;ESC&gt;[43;36m cyan on yellow     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(cyan on blue)        ",e,"[44;36m&lt;ESC&gt;[44;36m cyan on blue       ",e,"[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(cyan on magenta)     ",e,"[45;36m&lt;ESC&gt;[45;36m cyan on magenta    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(cyan on cyan)        ",e,"[46;36m&lt;ESC&gt;[46;36m cyan on cyan       ",e,"[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(cyan on white)       ",e,"[47;36m&lt;ESC&gt;[47;36m cyan on white      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(cyan on default)     ",e,"[49;36m&lt;ESC&gt;[49;36m cyan on default    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(white on red)        ",e,"[41;37m&lt;ESC&gt;[41;37m white on red       ",e,"[7m    ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(white on green)      ",e,"[42;37m&lt;ESC&gt;[42;37m white on green     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(white on yellow)     ",e,"[43;37m&lt;ESC&gt;[43;37m white on yellow    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(white on blue)       ",e,"[44;37m&lt;ESC&gt;[44;37m white on blue      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(white on magenta)    ",e,"[45;37m&lt;ESC&gt;[45;37m white on magenta   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(white on cyan)       ",e,"[46;37m&lt;ESC&gt;[46;37m white on cyan      ",e,"[7m   ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(white on white)      ",e,"[47;37m&lt;ESC&gt;[47;37m white on white     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(white on default)    ",e,"[49;37m&lt;ESC&gt;[49;37m white on default   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(default on red)      ",e,"[41;39m&lt;ESC&gt;[41;39m default on red     ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(default on green)    ",e,"[42;39m&lt;ESC&gt;[42;39m default on green   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(default on yellow)   ",e,"[43;39m&lt;ESC&gt;[43;39m default on yellow  ",e,"[7m       ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(default on blue)     ",e,"[44;39m&lt;ESC&gt;[44;39m default on blue    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(default on magenta)  ",e,"[45;39m&lt;ESC&gt;[45;39m default on magenta ",e,"[7m      ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(default on cyan)     ",e,"[46;39m&lt;ESC&gt;[46;39m default on cyan    ",e,"[7m ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(default on white)    ",e,"[47;39m&lt;ESC&gt;[47;39m default on white   ",e,"[7m        ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[39;49m(default on default)  ",e,"[49;39m&lt;ESC&gt;[49;39m default on default ",e,"[7m      ...&lt;ESC&gt;[7m reverse",e,"[0m"
$ w "[0;m"
