The X Color Management System (Xcms)

NOTE: this page has not been significantly modified since October 2003. Here are some updated links to more recent work on color management:

1. Introduction

A device-independent color management system, Xcms, was contributed to the X Window System distribution with X11 Release 5 in 1991. Xcms was based on the TekColor color management system by Tektronix, Inc. However, the book version of the documentation, (A Technical Introduction to) The X Color Management System by Al Tabayoyon, Joann Taylor and Chuck Adams of Tektronix, Inc. was never published by O'Reilly and Associates, Inc. This page collects information for those who wish to hack Xcms but are having trouble finding documentation.

Xcms comes from an era (1991) when 8 bit color displays were the norm on UNIX workstations. Therefore it is primarily concerned with converting device-independent colors to the RGB values used in video framebuffer lookup tables driving CRT monitors. There are extensions for installing new colorspaces, such as sRGB, but as Xcms also predates the ICC, there are no tools for reading and writing ICC profiles.

Xcms consists of two main parts, the X Device Color Characterization Convention (XDCCC) and the Xlib API.

The XDCCC describes the mathematical formulas used to convert from device-independent CIEXYZ colorspace to the device-dependent, non-linearly quantized RGB colorspace used in the X protocol. It also describes the form in which this DDC information is stored in the root window of an X server display screen. This allows any client to query a screen for the information, and implement a conversion from CIEXYZ to X protocol RGB so that a device-independent color appears properly on the screen.

The Xcms API in Xlib provides an interface to the standard X colormap functions, but allows color table reads/writes in device-independent colors as well as non-linear RGB. The Xcms API uses the DCC data loaded into the root window properties by xcmsdb.

2. Documentation

Information from several places within the X11R4 and X11R6.6 source distribution follows.

2.1 Copyright, end-user license agreement, and warranty statement

The X11R6.6 release notes (ASCII, 16k) contain this information.

2.2 The X Device Color Characterization Convention (XDCCC)

The primary reference for the XDCCC is Section 7 (PDF, 29k) of the Inter-Client Communication Conventions Manual (ICCCM). The original draft (PDF, 12k) of the XDCCC was distributed with X11R4. The xcmsdb man page (PDF, 7k) describes how to load XDCCC properties into the root window using a Device Color Characterization (DCC) file. Two samples of DCC files, sample1.dcc (ASCII, 27k) and sample2.dcc (ASCII, 26k) are provided.

2.3 Xcms API

The primary reference for the Xcms API is Chapter 6 (PDF, 292k) of Xlib - C Language X Interface programmer's guide. The original draft (PDF, 83k) and index (PDF, 4.5k) of the API were distributed with X11R4.

3. Links

3.1 Standards Organizations

3.2 Other color management systems

3.3 Other Xcms hacking sites

4. Glossary

Argyll
A free color management system
CIE
Commission Internationale de l'Eclairage (English translation: International Commission on Illumination)
CIEXYZ
A device-independent colorspace specified by the CIE
client
A program which connects to an X server and uses its services. The canonical example is xterm.
DCC file
Device Color Characterization file. Contains the color properties of a monitor and which can be loaded into the X server using the xcmsdb program.
DDC
Display Data Channel. The VESA protocol by which monitors inform operating systems of their properties via digital signaling on the video cable connecting the monitor to the video card.
EDID
Extended Display Identification Data. The data structure describing monitor model numbers, video modes, colors, etc. passed by monitors to video hardware via the display data channel (DDC).
ICC
International Color Consortium
ICC Profile
A file format which specifies the transformation of color from a device-dependent format to a device-independent colorspace
ICCCM
Inter-Client Communication Conventions Manual. Part of the X11 documentation which specifies preferred client behavior.
icclib
A free library for reading and writing the ICC Profile format
Little CMS
A free color management system
RGB
A device-dependent colorspace based on additive red, green, and blue primaries. Usually non-linearly encoded to 24 bits, 8 bits per component. This is the native colorspace of the X protocol.
sRGB
The device-independent color space specified for use on the World Wide Web
VESA
Video Electronics Standards Association
Xcms
X Color Management System. The color management system in X11 Release 5 and later releases.
xcmsdb
Program for loading, querying, and removing DCC data to/from the root window of an X server screen.
XDCCC
X Device Color Characterization Convention. The standard format for describing the color properties of a monitor in X. These properties are formatted in a DCC file and loaded into the X server via the xcmsdb program.
Xlib
The baseline C programming language bindings to the X window system library. Widget toolkits are built on Xlib.