ucmm organization and conventions.

ucmm (Unix micro Color Management Module) is a color management module designed just to handle the necessary configuration needed to track the installation and association of ICC profiles with Unix/Linux X11 displays. It could be expanded at some point to also hold the associations for other devices such as scanner and printers.

It consists primarily of a small configuration database that associates a display monitor (identified by its EDID or the X11 display name if an EDID is not known) with an ICC Display profile.

There are two configuration contexts, local system and per user, the latter taking precedence when both are present.

ucmm follows the XDG Base Directory specifications for the location of the configuration file and display profiles.

For the local system context, the ucmm configuration file is located at:

      $XDG_CONFIG_DIRS/color.jcnf
or   /etc/xdg/color.jcnf

and display profiles are stored in

      $XDG_DATA_DIRS/color/icc/devices/display/
or   /usr/local/share/color/icc/devices/display/

For per user contents, the ucmm configuration file is located at:

      $XDG_CONFIG_HOME/color.jcnf
or   $HOME/.config/color.jcnf

and display profiles are stored in

      $XDG_DATA_HOME/color/icc/devices/display/
or   $HOME/.local/share/color/icc/devices/display/

The configuration format of the color.jcnf files uses the JSON JavaScript Object Notation, a lightweight data-interchange format.

A hierarchy of members is used to represent a hierarchical key/value pair format.

The monitor to ICC profile association is organized as independent records, having the form:

  key                                               value

  devices/display/N/EDID                   Monitor EDID  in upper case Hexadecimal
  devices/display/N/ICC_PROFILE      Full path to the associated ICC profile

or

  devices/display/N/NAME                  X11 display name
  devices/display/N/ICC_PROFILE      Full path to the associated ICC profile

where N is a number starting from 1, that distinguishes each record, but otherwise has no special meaning.

The first form is the preferred form, since it associates the profile with the actual display, and therefore it is possible to have the profile track the display, no matter which X11 screen it is plugged into. The second form is a fallback, for situations in which a monitor does not have an EDID, or where the X11 server is configured in a way that does not permit access to the EDID (i.e.., on a second screen when Xinerama is running).

The following is an example of a per user color.jcnf:

{
  "devices": {
    "display": {
      "1": {
        "EDID": "0x00FFFFFFFFFFFF0034A1731751720000150901010C1F17CDE8A11E9E554A982712474FA4CE0045598180315961590101010101010101000000FE004D6F6E69746F720A2020202020000000FE004D6F6E69746F720A2020202020000000FE004D6F6E69746F720A2020202020000000FE004D6F6E69746F720A2020202020003D",
        "ICC_PROFILE": "/home/graeme/.local/share/color/devices/display/mon1.icc"
      },
      "2": {
        "NAME": ":0.1",
        "ICC_PROFILE": "/home/graeme/.local/share/color/devices/display/mon2.icc"
      }
    }
  }
}

Implementation

The configuration file format is in the Argyll source in the jcnf sub directories, and the ucmm functionality in the ucmm sub directories, and is made available under an MIT like free use license.