English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I try search the internet without any info found. please help

2007-03-24 03:15:01 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

what screen are you trying to display the text on? how are you communicating with it?
what i mean is, if you are communicating to a PC through a serial port using hyperterminal, then its easy to do. before you output your text you need to send the proper "escape code" to set the color. example: green text on black background would be "ESC[32,40m testing green ESC[0m";
the "ESC[0m" resets the color back to B/W. ESC is defined as 1B hex.

the table below shows the different colors

Color Foreground Code Background Code
Black 30 40
Red 31 41
Green 32 42
Yellow 33 43
Blue 34 44
Magenta 35 45
Cyan 36 46
White 37 47

2007-03-25 02:44:56 · answer #1 · answered by justme 7 · 0 0

fedest.com, questions and answers