Xterm 256 Colors  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
Support for 256 colors was added to xterm in 1999 by its maintainer Thomas Dickey, using a patch created by Todd Larason. It's an extension to the ANSI color standard using a compatible format and has been adopted by most terminal emulators and MUD clients.
To send a 256 color foreground color one must print "\e[38;5;#m" where # is a number between 0 and 255. For background colors one must print "\e[48;5;#m" where # behaves in the same manner as foreground colors.

256 Color Codes


256 Color Escape Sequences


256 Color Options


256 Color RGB Values

To display code 0 through 15 using 24 bit RGB colors the following hexadecimal values are suggested: \x00 and \xAA for normal intensities, and \x55 and \xxFF for bold intensities.

To display code 16 through 231 using 24 bit RGB colors the following hexadecimal values are suggested for the 6 intensities on a black background: 00, 66, 88, BB, DD, and FF. The 216 RGB color variants can be separated into three achromatic colors, three primary colors, three secondary colors, and six tertiary colors. In the ANSI tradition these can be split into dim and bold intensities. To calculate the color code multiply the red intensity by 36, the green intensity by 6, the blue intensity by 1, and add 16 for the offset.

To display code 232 through 255 using 24 bit RGB colors the following hexadecimal values are suggested for the 24 shade grayscale: start out at 8 for the first color and increment the value by 10 for each increment. \x08, \x12, \x1C, \x26, etc.

Support
256 color support is available in most MUD clients and terminal emulators that were updated after 2008.

Detection
There is no universal standard for the detection or negotiation of 256 color support. The following methods exist:
By using the TTYPE TELNET option and checking for a terminal emulator or mud client known to support 256 colors, such as xterm.
By using the TTYPE TELNET option and checking for the -256color, or -truecolor suffix. For example: xterm-256color.
By using the TTYPE TELNET option and using the MUD Terminal Type Standard to detect 256 color support.

Links

If you want a link added, you can email me at mudclient@gmail.com.

Clients supporting 256 color

Comparison of MUD clients - Wikipedia has a list of MUD clients with 256 color support.
Comparison of terminal emulators - Wikipedia has a list of terminal emulators with 256 color support.

Codebases

Comparison of MUD codebases - Mudpedia contains a list of MUD servers with 256 color support.

Snippets

256 color parser - Handles ANSI 16 colors and xterm 256 colors.