Mathematics behind adjustments in the Color Calibration module

Hi,

I am new to darktable, as well as working with colors in general. Recently I was watching this great video made by @s7habo. It’s really helpful for me, and I appreciate the video.

At the beginning of his video, he talked about various ways to get orange and teal combinations via the channel mixer. The explanation in the video made sense, but I don’t think I fully understand the math.

For example, if I know that I want red to be converted to some hue, and blue to some other hue, how can I calculate the percentages I should apply in the channel mixer? In the video, we first start by mapping

  • Red to Orange
  • Magenta to White (I think)
  • Blue to Cyan
  • Cyan to Cyan
  • Green to Black
  • Yellow to Orange

The math in the video makes sense, but I’m not sure how to generalize it. How can I expand this to two (or more) arbitrary colors?

It seems like there must be a formula for calculating this stuff, but my internet search skills are failing me. I’d really appreciate any insights anyone can provide.

Thank you!

2 Likes

OMG! Welcome to our forum Aaron :slight_smile:

now you know one of the reasons why i keep bothering you about rails and ruby :slight_smile:

1 Like

hahaha thank you! I thought I recognized that icon! :smile:

1 Like

there is some math in darktable user manual - color calibration

not sure if this helpful. but i see @s7habo is also replying so i will shut up :slight_smile:

also remember you can use MathJax here :slight_smile:

1 Like

Hello @tenderlove and welcome to the forum!

Hehe. I also wanted to send im the same link. You were faster :wink:

1 Like

Ah, these matrices help a lot. Thank you both!

I have to admit that playing with the math in a program is easier / faster than dragging sliders in darktable (for me anyway).

The Channel Mixer.pdf (68.9 KB)

The one does some color breakdowns for you…

2 Likes

i mean we also host the forum for gmic. :slight_smile: that has a nice scripting language for image manipulation for you :wink:

1 Like