For MUD Clients
256 Colors
IBM Chars

This page is a quick explanation of what is necessary to make a MUD client able to view FANSI 2.0 correctly. Please see the Comprehensive Specification page for broader information on FANSI, including what is required for MUD servers.


FANSI 2.0 is supported by several major clients, including MUSHClient, Z-Mud, CMUD, WinTin.NET and Putty. A MUD Client that supports FANSI 2.0 does the following:

1. Displays the IBM/OEM extended characters (code page 437):

The user should be allowed, if they so choose, to display the IBM/OEM (code page 437) extended characters. This can be accomplished:

  • (For Windows clients) By allowing the built-in "Terminal" bitmap font to be selectable as a font choice for the MUD output screens, or
  • Allowing another font that displays the extended characters from the 437 code page, or
  • By allowing the user to use any fixed-width font for the standard ASCII characters, but then replacing the special characters with the Unicode equivalents of the IBM/OEM extended characters.

The exact characters that should be displayable from code page 437 are: 1, 3-6, 14-26, 28-31, and 127 through 254. Those characters are:


While it is preferred that all of these characters be displayable, some "FANSI capable" clients are unable to display some of them, while still displaying most.

2. Allows either XTerm 256 colors or MXP colors

FANSI capable clients allow 256 colors, either through XTerm's 256 color codes, or via MXP's <COLOR> (<C>) tags. XTerm's 256 color codes are easier to add than MXP, and they come in the following format:

Foreground color change: <ANSI escape code>[38;5;<0-255>m
Background color change: <ANSI escape code>[48;5;<0-255>m

To reset fore and background colors to their defaults: <ANSI escape code>[0m

The <ANSI escape code> is ASCII character 27.

The <0-255> number is the color number, which is organized as follows:

  • 0 through 15 are the same as the first 16 standard ANSI colors. (In order: black, red, green, yellow, blue, magenta, cyan, white, bright black, bright red, bright green, bright yellow, bright blue, bright magenta, bright cyan, and bright white.) These should already be available in your MUD client, so use the same colors you currently use.
  • 16 through 231 are a red/green/blue 6x6x6 color cube based upon the formula:
    16 + (<Red> * 36) + (<Green> * 6) + <Blue>
    where <Red>, <Green>, and <Blue> are values from 0 to 5.
  • 232 through 255 are 24 tone grayscale ramp gradiating from black to bright gray.

For a color table with the exact red/green/blue values of colors 16-255, see the Comprehensive Specification page. For examples of 256 color implementation code, see the 256 Color Implementation page.

If your client already supports MXP, or you wish to support MXP instead of the XTerm 256 color codes, see the MXP specification.