command line colors (9)

1 Name: #!/usr/bin/anonymous : 2008-04-03 15:41 ID:vKgh/DDA

I've noticed that certain programs that run within the command line can present text in multiple colors at once. How can I use this functionality?

2 Name: #!/usr/bin/anonymous : 2008-04-03 18:01 ID:sbi6aEpz

Google ansi color codes

3 Name: #!/usr/bin/anonymous : 2008-04-05 13:13 ID:vKgh/DDA

I was hoping I could do this in a Windows batch script, but using it from within C is still neat. Thanks.

4 Name: #!/usr/bin/anonymous : 2008-04-05 13:49 ID:Heaven

>>3
You still can

5 Name: #!/usr/bin/anonymous : 2008-04-07 04:51 ID:ULZHe4Xa

>>3 You can. You simply need an editor that lets you enter ^[

6 Name: #!/usr/bin/anonymous : 2008-04-07 07:04 ID:Heaven

>>5
And Notepad can... Alt-27? (I'm not on Windows at the moment, though, so can't verify. Might be Alt-027.)

EDIT.COM can too, which I recommend if you're going for the true oldschool experience. Also, do it all in fullscreen mode, so you can learn the way old farts like myself did: quitting and restarting the editor to do every test. It's fantastically tedious.

And if that's not enough for you, run it off of an 5ΒΌ" floppy.

7 Name: #!/usr/bin/anonymous : 2008-05-31 03:42 ID:lMOJFos3

How do I do this in C? I've found instructions on configuring COMMAND.COM so that batch files can play with the colors, but I know when I use a program compiled in C and it displays multiple colors, nothing's been done to my computer's configuration. I just compiled a program that printf's the string "\033[0;40;32m;Hello World!\n" and it showed up in black and white.

8 Name: dmpk2k!hinhT6kz2E : 2008-05-31 04:40 ID:Heaven

Run ansi.com first.

MS-DOS used to come with it, and there were various alternate ANSI implementations as well.

9 Name: #!/usr/bin/anonymous : 2008-05-31 07:29 ID:Heaven

> quitting and restarting the editor to do every test. It's fantastically tedious.

i never understood why they took that feature out when they turned the qbasic ide into a text editor.

This thread has been closed. You cannot post in this thread any longer.