Color mixing ed
How do colors interact? What is "subtractive color mixing"?
Simplification: we'll assume that there are only 3 independent wavelengths (colors: red, green, blue). Real life is messier, because these 3 perceived colors can have some overlap in the spectrum.
Try it yourself: https://michi.is-a-geek.org/small/color-mixer.html
Table of Contents
- Color mixing
- Multiple light sources
- Single light with matter
- Transmission (transparent light filter)
- Reflection
- Mixing materials (in an ideal world)
- Multiple transparent filters (stacked)
- Multiple transparent filters (mixed)
- Multiple strong pigments
- Real world colors
- Blue + yellow = green?
- Imperfect filters
Multiple light sources ed
For a single wavelength, the intensities (energy) from two sources will just add up.
Physical reason: the equations of light (Maxwell equations) are linear.
Three independent wavelengths will add similarly:\[ L_{\mathrm{out}} = L_1 + L_2 = \begin{pmatrix} r_1 \\ g_1 \\ b_1 \end{pmatrix} + \begin{pmatrix} r_2 \\ g_2 \\ b_2 \end{pmatrix} \]
Single light with matter ed
Transmission (transparent light filter) ed
Shining a single wavelength onto a transparent material, only a certain percentage will come out on the other side. The rest will be absorbed or reflected.
Physical reason: a thorough explanation would require some quantum field theory. Let's not do that.
For 3 color components, we can find 3 transmission factors \(0 \le R,G,B \le 1\), combined into a vector \(M\):\[ L_{\mathrm{out}} = M \cdot L_{\mathrm{in}} = \begin{pmatrix} R \cdot r \\ G \cdot g \\ B \cdot b \end{pmatrix} \]
Reflection ed
This can happen for different reasons: metals really reflect while most other materials reflect by diffuse sub-surface scattering (light entering the material, traveling some distance with filtering, and then exiting).
Either way, we get a single percentage for each color component and the same formula as for transmission.
Mixing materials (in an ideal world) ed
This is usually sloppily called "subtractive mixing". Sadly, the term is applied to several different situations, with very different behavior.
Multiple transparent filters (stacked) ed
We already know how to solve this:
Any light going through the first filter gets multiplied by its coefficients. Then, going through the second filter, we have to multiply again. Overall, this behaves like a single filter with the coefficients multiplied:\[ M_{\mathrm{combined}} = M_1 \cdot M_2 = \begin{pmatrix} R_1 \\ G_1 \\ B_1 \end{pmatrix} \cdot \begin{pmatrix} R_2 \\ G_2 \\ B_2 \end{pmatrix} \]
- Examples
red (1, 0, 0) + orange (1, ½, 0) = red (1, 0, 0)
red (1, 0, 0) + cyan (0, 1, 1) = black (0, 0, 0)
Multiple transparent filters (mixed) ed
What if we really mix the materials from 2 filters?
First, what if we make a filter 50% thinner? The answer should be \(\sqrt{M}\), because stacking two thin filters should give the original one (\(\sqrt{M} \cdot \sqrt{M} = M\)).
Now, mixing two materials should (keeping the overall thickness) should give\[ M_{\mathrm{combined}} = \sqrt{M_1} \cdot \sqrt{M_2} \]
This might be roughly what happens if you mix 2 transparent liquids (water colors).
Multiple strong pigments ed
If there are two types of reflective pigments, and each ray of light only gets reflected by exactly one pigment with 50/50 chances, we get\[ L_{\mathrm{out}} = M_1 \cdot \frac{1}{2} \, L_{\mathrm{in}} + M_2 \cdot \frac{1}{2}\, L_{\mathrm{in}} \]or\[ M_{\mathrm{combined}} = \frac{1}{2}\, M_1 + \frac{1}{2}\, M_2 \, . \]
- Examples
blue (0, 0, 1) + yellow (1, 1, 0) = grey (½, ½, ½)
red (1, 0, 0) + orange (1, ½, 0) = red-ish (1, ¼, 0)
red (1, 0, 0) + cyan (0, 1, 1) = grey (½, ½, ½)
This describes more oil paint and some forms of printing techniques.
Real world colors ed
Blue + yellow = green? ed
For both models (mixed filters and pigments), blue+yellow combines to black or gray, but not green!
Actually, even in real life, blue+yellow do not give green! If you mix oil paint with a blue at \((0,0,1)\) with a yellow at \((1,1,0)\), the outcome is gray!
The cheat is to use a blue with a certain amount of green inside. Then you also get in our models:
blue (0, ¼, 1) + yellow (1, 1, 0) = green (0, ½, 0) (mixed filters)
blue (0, ¼, 1) + yellow (1, 1, 0) = green-ish (½, ⅝, 0) (pigments)
Imperfect filters ed
Also, in real life, you will never find perfectly filtering paint. Transmission with a coefficient of 0 would absolutely block all light of that component, no matter how thin or diluted the paint becomes (a single drop of black water color would turn any other water color also perfectly black).