Share

Converting Between Colour Spaces Using Connection Spaces

It is often necessary to convert between colour spaces several times along an image pipeline. For example, you may need to convert several inputs from different spaces to a common working space so that they can be composited and blended, and then convert to another space for output. A connection space is used to perform these conversions.



What Is a Connection Space?

A connection space is an intermediate colour space used to minimize the number of different colour transforms that are needed to convert from each colour space to every other one.

For example, to directly convert back and forth between four colour spaces, you would need twelve different transformations. Adding a fifth colour space would require eight more, or twenty in total. In general, adding an Nth space requires an additional 2(N – 1) transforms, or N^2 – N transforms in total.

However with a connection space, you only need eight transformations to convert back and forth between four colour spaces. Each additional colour space requires only two additional transforms, or 2N transforms in total. But note that each conversion now requires two steps: the first to convert from the source space to the connection space, and the second to convert from the connection space to the target space.



Connection Spaces in OpenColorIO

When you convert between colour spaces in an application, OCIO uses a connection space under the hood. In OCIO, the connection spaces are called reference spaces. There are two reference spaces: once for scene-referred and the other for display-referred colour spaces. The scene-referred colour spaces are in the colorspaces section and the display-referred colour spaces are in the display_colorspaces section. (However, note that in OCIO v1 configs, there was only one reference space, used by all colour spaces in the config.)

In the OCIO config presets shipped with the application, and with the ACES configs provided by the OCIO project, these are the reference spaces that are used:

  • ACES2065-1 is the scene-referred reference space.
  • CIE XYZ, normalized to illuminant E and using D65 as the adaptive white point, is used as the display-referred reference space.

Was this information helpful?