X PixMap
X PixMap (XPM) is an image file format used by the X Window System, created in 1989 by Daniel Dardailler and Colas Nahaboo working at Bull Research Center at Sophia Antipolis, France, and later enhanced by Arnaud Le Hors.
It is intended primarily for creating icon pixmaps, and supports transparent pixels. Derived from the earlier XBM syntax, it is a plain text file in the XPM2 format or of a C programming language syntax, which can be included in a C program file.
XPM
The XPM format is an array of strings composed of six different sections as follows:
This is a black-and-white image in the first (1989) XPM format.
The values section contains the width, height, number of colors, and number of characters per pixel.
XPM2
XPM2 simplifies the format by removing all C codes. An example:
This is an XPM2 file with width 48, height 4, 2 colors, and 1 character per pixel.
One tool is known to use only a to p for 16 colors, switching to aa up to dp for 64 colors, but still reading single character encodings for 64 colors; compare Base64.