View Full Version : Linux Color (quazi NOOB)
lavaman
12-05-2002, 11:42 PM
Probably the most asked question in windows converted to linux:
How can you have collored text in a linux console program.
:)
And if anyone knows, in gVIM, how do you get it to keep you color scheme?
face_master
12-06-2002, 04:03 AM
This search would probably be more effective than just 'color'
http://www.cprogramming.com/cboard/search.php?s=&action=showresults&searchid=215749&sortby=lastpost&sortorder=descending
unixOZ
12-06-2002, 10:33 AM
This is how I do it
char green[11]="\033[1;32m";
char blue[11]="\033[1;34m";
printf("%sThis is how you use colors\n", blue);
printf("%s-------------------\n", green);
I believe that there are various alternatives
Originally posted by unixOZ
This is how I do it
char green[11]="\033[1;32m";
char blue[11]="\033[1;34m";
printf("%sThis is how you use colors\n", blue);
printf("%s-------------------\n", green);
I believe that there are various alternatives
why [11] and not [8]?
Hammer
12-06-2002, 06:09 PM
>>why [11] and not [8]?
Why not [] ?
char green[]="\033[1;32m";
unixOZ
12-06-2002, 06:16 PM
char green[]="\033[1;32m"; is better
Lynux-Penguin
12-07-2002, 06:19 PM
here is a good explanation:
http://www.linuxgazette.com/issue65/padala.html
-Luke
PS:
next time try:
http://www.google.com/linux
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.