The Role and Relevance of 3×3 Color Transformation Matrices in Color Science-Based Image Pipelines

In digital imaging workflows—particularly those involving color management, camera matching, and film emulation—the use of 3×3 color transformation matrices remains a foundational method for applying accurate linear color space conversions. A tool recently shared on Reddit by the user ctcwired introduces a practical and accessible way to calculate such matrices from a source (e.g., a digital camera) to a target (e.g., a film scan). The script is available via GitHub:
https://github.com/ctcwired/dctl-matrix-maker.

The process requires linear input imagery, ideally in OpenEXR (.exr) format, to ensure the correct mathematical application of the matrix. Since a 3×3 matrix performs a linear RGB transformation, using non-linear input (such as images encoded in gamma-corrected color spaces like sRGB) would yield inaccurate results. While the script is designed for EXR input, it has also been observed to function with linearized TIFF files.

The output is a complete DCTL (DaVinci Color Transform Language) file, which allows for immediate application within DaVinci Resolve, providing Resolve users with a workflow that mirrors the functionality of the mmColorTarget plugin used in Nuke pipelines. This comparison is significant because mmColorTarget has long been considered a high-quality tool for camera matching and color chart calibration, but remains inaccessible to many users due to platform-specific dependencies and installation complexity.

For background, Zeb Gardner introduced a related concept with his tool for color optimization using genetic algorithms, termed the “Genetic Color Space Transform Optimization Algorithm,” detailed in the article:
https://www.zebgardner.com/photo-and-video-editing/genetic-color-space-transform-optimization-algorithm.
While Gardner’s method explores more advanced and dynamic forms of transform fitting, the simplicity and immediacy of the 3×3 matrix approach retain practical value.

From a color science standpoint, a 3×3 matrix is essential for defining primary transformations, chromatic adaptation (e.g., between D65 and D60 white points), or approximate gamut mapping between color spaces. Though it cannot model non-linear tone curves or perceptual shifts, it remains ideal for:

  • Input Device Transforms (IDTs) in ACES or custom workflows.
  • Camera matching in multi-camera setups.
  • Fast, mathematically consistent creative tweaks in look development.
  • Pre-processing before film print emulation LUTs, where a tailored matrix can better approximate a film scan than generic Rec.709 or P3 transforms.

This tool’s ability to integrate directly into Resolve as a lightweight DCTL also makes it a more efficient alternative to heavier, more nuanced transforms such as Radial Basis Function (RBF) interpolation or tetrahedral LUTs. While such methods provide higher fidelity, a 3×3 matrix offers speed, editability, and clarity—particularly in the early stages of look creation or for subtle final image adjustments.

For users building layered, hybrid color pipelines, tools like this one offer critical flexibility and control.

In the last Blogpost I will try and create a custom 3×3 Matrix with Python.

Demystify Color. “Film Profile Journey 21: mmColorTarget for Resolve.” Demystify Color, October 29, 2023. https://www.demystify-color.com/post/film-profile-journey-21-mmcolortarget-for-resolve.

Gardner, Zeb. “Genetic Color Space Transform Optimization Algorithm.” Zeb Gardner, August 30, 2023. https://www.zebgardner.com/photo-and-video-editing/genetic-color-space-transform-optimization-algorithm.

Leave a Reply

Your email address will not be published. Required fields are marked *