Color your Bash Prompt, 16M edition!

#OPTIONS: toc:nil


How to color the Bash prompt

I have revised the script to color my bash prompt, which now manages colors expressed as R;G;B, in terminals which support 16M colors.

To make it short (after all, you need some time to try all 16M colors, don’t you?):

and here you can find the script here: color-bash-prompt-16M.

Some examples:

$ cat # so that you know what it does

$ source

$ list_colors

$ set_prompt_color --256 255

# quotes are important since ; separates commands
$ set_prompt_color --16M "255;120;120"

You can use a third argument to set the background color as well.