HomeSoftwareGamesMusicForum

XTerm 256 colours

On most terminals xterm can display not only the usual 16, but 256 different colours, provided the program has been compiled with --enable-256-color option. This is very convenient for text structuring, colourized shell prompts etc. A good description can be found here. To find the escape code corresponding to the desired colout quickly, I wrote a little Python program:

Colours may be set arbitrarily. The program calculates the xterm colours best matching the selected colours. The text entered in the field below is displayed in xterm colours, which may differ slightly from the selected ones. The escape sequences for background and foreground are displayed at the right side. A click on one of the copy buttons copies the correspondig code into the clipboard.

up
Created 2011-08-11 by mopcoge