channel mixer (deprecated)
Please note that this module is deprecated from darktable 3.4 and should no longer be used for new edits. Please use the color calibration module instead.
A simple yet powerful tool to manage color channels.
This module accepts red, green and blue channels as an input and provides red, green, blue, gray, hue, saturation and lightness channels as output. It allows you to independently control how much each input channel contributes to each output channel.
πRGB matrix multiplication
You can think of the channel mixer as a type of matrix multiplication between a 3x3 matrix and the input [R G B] values.
β R_out β β Rr Rg Rb β β R_in β
β G_out β = β Gr Gg Gb β X β G_in β
β B_out β β Br Bg Bb β β B_in β
If, for example, you’ve been provided with a matrix to transform from one color space to another, you can enter the matrix coefficients into the channel mixer as follows:
- set the destination to red then set the Rr, Rg & Rb values using the red, green and blue sliders
- set the destination to green then set the Gr, Gg & Gb values using the red, green and blue sliders
- set the destination to blue then set the Br, Bg & Bb values using the red, green and blue sliders
By default, channel mixer just copies the input [R G B] channels straight over to the matching output channels. This is equivalent to multiplying by the identity matrix:
β R_out β β 1 0 0 β β R_in β
β G_out β = β 0 1 0 β X β G_in β
β B_out β β 0 0 1 β β B_in β
As an example use case, the following matrix is useful for taming ugly out-of-gamut blue LED lights by making them more magenta:
β 1.00 -0.18 0.18 β
β -0.20 1.00 0.20 β
β 0.05 -0.05 1.00 β
In this case it is useful to use a parameteric mask to limit the effect of the channel mixer to just the problematic colors.
A more intuitive take for what the channel mixer sliders do:
- for the red destination, adjusting sliders to the right will make the R, G or B areas of the image more red. Moving the slider to the left will make those areas more cyan.
- for the green destination, adjusting sliders to the right will make the R, G or B areas of the image more green. Moving the slider to the left will make those areas more magenta.
- for the blue destination, adjusting sliders to the right will make the R, G or B areas of the image more blue. Moving the slider to the left will make those areas more yellow.
πmonochrome
Another very useful application of the channel mixer is the ability to mix the channels together to produce a grayscale output – a monochrome image. Use the gray destination, and set the red, green and blue sliders to control how much each channel contributes to the brightness of the output. This is equivalent to the following matrix multiplication:
GRAY_out = [ r g b ] X β R_in β
β G_in β
β B_in β
When dealing with skin tones, the relative weights of the three channels will affect the level of detail in the image. Placing more weight on red (e.g. [0.9, 0.3, -0.3]) will make for smooth skin tones, whereas emphasising green (e.g. [0.4, 0.75, -0.15]) will bring out more detail. In both cases the blue channel is reduced to avoid emphasising unwanted skin texture.
Different types of traditional black and white film have differing sensitivities to red, green and blue colors, and this can be simulated by setting the gray destination coefficients appropriately. The channel mixer module has a number of built-in presets that can be used to achieve this.
πmodule controls
- destination
- Select the destination channel that will be affected by the slider settings immediately below. The red, green and blue destination channels are used for color mixing as described in the matrix multiplication section above. The gray channel is used for making grayscale images as described in the monochome section above. It is also possible to define the R, G & B input channels to produce HSL (hue, saturation and lightness) values on the output, although this is a very specialised application.
- red
- Defines how much the red input channel should contribute to the selected destination channel.
- green
- Defines how much the green input channel should contribute to the selected destination channel.
- blue
- Defines how much the blue input channel should contribute to the selected destination channel.
translations
- German (translation incomplete): Kanalmixer (veraltet)
- Polish (translation incomplete): mikser kanaΕΓ³w (przest.)
- PortuguΓͺs (translation incomplete): misturador de canais (obsoleto)
- Ukrainian (translation incomplete): Π·ΠΌΡΡΡΠ²Π°Ρ ΠΊΠ°Π½Π°Π»ΡΠ² (Π·Π°ΡΡΠ°ΡΡΠ»ΠΈΠΉ)
- Dutch (translation incomplete): kanaalmenger (verouderd)