Cheap ANSI Color! by Jim Valentine (simon@tir.com)

Greetings, I'm just another user/self-admin of Linux and I would have to say that it beats the crap outta anything else I've played with for OS's. Well, this posting is about creating Cheap Ansi color sequences using a Very cool text editor called Joe. I came up with this trick out of pure luck and by rtfm. Well on with the show:

Joe is a pretty nice text editor that should come with all or most distributions of Linux. It's easy like pico and powerful like vi, though I'm sure emacs would blow it away but I've never used emacs (yet). So, to use this trick you need to use joe.

Once you start joe it's just a matter of hitting a couple of command keys. However, you need to know the actual ansi color escape sequences to do this. The command key is the " ` " key, (reversed apostrophy), once you do this, joe will ask at the bottom of the screen what kind of special code you wish to use. Use the left bracet "[". It will make a bold text left bracet.

So by typing: `[[0;31mThis is Red text!`[[1;0m will create red text on the default background, then return the next instance of text back to normal.

I've included some of the color sequence codes here for you to use.

Code            Color
-----------------------------
[0;30m       |  black text
[0;31m       |  red
[0;32m       |  green
[0;33m       |  blue
[0;34m       |  purple
[0;35m       |  cyan
[0;36m       |  silver
[0;40m       |  red back.
[0;41m       |  green back.
[0;42m       |  brown back.
[0;43m       |  blue back.
[0;44m       |  purple back.
[0;45m       |  cyan back.
[0;46m       |  silver back.

Ok, now that that is done, here is some explaination of additional codes you can use to make the colors either bold or blinking.

0 is for default color.
1 is for bold (ie. blue becomes light blue)
5 is for blinking.
2J will clear the screen.

Don't forget to put the small cast 'm' at the end of each code. Also, once the color has been started, it will stay that way until another code has been issued. That's why I use the sequence [1;0m to return it back to the default text color.

I use color quite often, just to make the system a little more lively. It can be used in the motd file, or any other file that will be cat'd. If your terminal doesn't support color then your out of luck.

Have fun and enjoy.

Jim Valentine (simon@tir.com)