How Color Mixing Works: Pigment Physics vs. RGB
Compare Kubelka-Munk subtractive pigment mixing against digital RGB averaging live — inspect 6-band reflectance curves and real paint behavior.
Studio Progress
Explore More Color Challenges
Switch instantly between pigment mixing, timed matching, vision tests, and shade sorting.
How the Kubelka-Munk Color Mixing Algorithm Works
If you have ever coded a quick gradient or paint widget in plain JavaScript by averaging Red, Green, and Blue pixel numbers, you have probably noticed something wrong: Blue plus Yellow does not make green—it collapses into muddy taupe gray. That failure happens because RGB encodes how a glowing digital screen emits red, green, and blue LED light inside dark pixels, whereas real artist paint works by absorbing and scattering light inside pigment layers.
Our browser mixing engine replaces naive pixel math with a simplified six-band Kubelka-Munk subtractive pigment model paired with perceptual OKLab color distance scoring:
- Six Spectral Bands (
420nm–660nm): Every studio pigment (Cyan, Magenta, Yellow, Ultramarine Blue, White, Black, Burnt Umber, Phthalo Green, and Venetian Red) stores reflectance values across six visible wavelength bands—from violet-blue (420nm) through peak green (520nm) up to deep red (660nm). - Converting Reflectance
Rto Absorption-Over-Scattering Ratio (K/S): Before mixing, each wavelength band transforms via the Kubelka-Munk equationK/S = (1 - R)^2 / (2R). BecauseK/Smixes linearly by pigment weight and tinting strength, doubling Blue or sneaking a single drop of strong Phthalo behaves proportionally like real easel mixing. - Reconstructing Visible Paint Color & OKLab Accuracy: Weighted
K/Ssums invert back to mixed spectral reflectanceR_mix(λ), integrate across CIE/sRGB weighting curves into crisp web display RGB, and score player accuracy (0.0%–100.0%) in uniform OKLab color space—where numerical distance tracks how sensitive human eyes actually are to brightness, red-green, and blue-yellow shifts.
Use the interactive lab right above to switch pigments, drag the blend ratio slider, and watch the live green 520nm curve diverge cleanly from digital RGB averaging.
Why Blue Plus Yellow Produces Vivid Green (Not Gray)
Look directly at the 420nm–660nm spectrum curve when you select Blue + Yellow in the lab above:
- Ultramarine Blue pigment reflects strongly around
420nm–470nm(blue-violet) while heavily absorbing warm570nm–660nmyellow, orange, and red wavelengths (K/Srises dramatically on the red end). - Cadmium-style Yellow pigment behaves oppositely: it strongly absorbs short
420nm–470nmblue wavelengths while reflecting almost90%+of green, yellow, and red light (520nm–660nm). - In the overlap (
520nmgreen band): Neither pigment blocks all medium-wavelength green light! So when Blue and Yellow droplets share the same binder, short blue light and long red light are both suppressed while medium green light bounces out—yielding natural emerald, forest, and olive greens (rgb(95, 143, 105)at a1:1ratio).
Meanwhile, Naive Digital RGB Averaging merely adds (43 + 242)/2 = 142 Red, (79 + 193)/2 = 136 Green, and (168 + 46)/2 = 107 Blue—producing neutral gray-beige (rgb(142, 136, 107)) because screen pixels have no spectral absorption model to preserve the 520nm green middle peak.
Six Real Pigment Mixes Compared Side-by-Side
| Pigment Pair (50/50) | Kubelka-Munk Subtractive Output | Naive RGB Average Output | Real Acrylic / Watercolor Behavior |
|---|---|---|---|
| Ultramarine Blue + Yellow | Emerald / Forest Green (#5F8F69) |
Muted Taupe Gray (#8E886B) |
Produces vivid olive to emerald greens depending on Yellow/Blue warmth |
| Quinacridone Magenta + Yellow | Vibrant Coral Terracotta | Peachy Pastel Salmon | High-chroma scarlet oranges and warm terracotta reds |
| Cyan + Magenta | Rich Cobalt / Royal Violet | Dusty Lavender-Gray | Deep ultramarine purples and berry tones without chalky washout |
| Burnt Umber + Cyan | Muted Slate / Deep Forest Shadow | Dull Charcoal-Olive | Neutralizes sky cyan into realistic architectural or landscape grays |
| Color + Titanium White | Soft Pastel Tint with True Chroma | Pale chalky desaturation | Lifts value cleanly while subtly warming/cooling tint behavior |
| Color + Ivory Black | Deep Rich Shadow (Black High Weight) |
Uniform Linear Darkening | Single drop shifts value rapidly without turning highlights muddy |
Algorithm Simulation vs. Physical Paint Experiments
Even the sharpest mathematical model is an approximation of physical studio chemistry. Here is where our simulation tracks physical acrylic, gouache, and watercolor experiments closely—and where real-world brushes introduce extra variables:
- Where Simulation Matches Reality: Dominant hue trajectories (Blue+Yellow → Green, Orange+Cyan → Natural Earth/Clay Gray), drop-by-drop tinting dominance (one drop of Black or Phthalo overpowering weak Yellow), and nonlinear brightening curves match easel mixing closely—making this site practical for warmups in our Paint Mixing Game and Color Mixing Studio.
- Physical Binder, Glazing & Drying Factors: Real pigments vary by pigment grind density, transparent vs. opaque fillers (for example, transparent Phthalo Green glazes differently over bright white gesso than opaque Cadmium Yellow), wet-to-dry acrylic polymer shift (acrylics typically dry slightly darker as milky emulsion turns clear), and watercolor paper granulation on cotton rag. Always mix physical test swatches before committing large studio batches or house walls.
Digital Screen Limits & Viewing Environment
Finally, remember that your screen displays physical pigment simulations inside glowing sRGB hardware pixels:
- sRGB Gamut Boundaries: High-chroma fluorescent paints and extreme spectral violets sit outside standard monitor sRGB triangles, so ultra-pure physical tube colors must be gently gamut-mapped onto displayable web HEX codes.
- Software Color Filters: Features like macOS/iOS True Tone, Windows Night Light, blue-light glasses, and aggressive OLED saturation presets visibly compress blue-green separation and warm whites. Turn off night shift filters before taking high-level rounds in our Color Perception Test or studying Color Theory Angles.
- Ambient Room Light: Daylight (
~5500K–6500K) vs. warm tungsten lamps (2700K) alters how your eyes judge olive vs. slate tones side by side.
Ready to apply optical physics in real rounds? Experiment freely with all nine pigments in Paint Lab, or head straight back to ColorMix Studio and try Master (Blind) difficulty.
Frequently Asked Questions
Why does digital RGB mixing turn Blue and Yellow gray?
Real paint works by absorbing light across wavelengths (subtractive mixing), whereas RGB numbers merely average screen brightness linearly—collapsing opposing red/green/blue channels like Blue and Yellow toward muddy gray.
How does your Kubelka-Munk mixing equation work in real time?
Each tube stores reflectance across six wavelength bands (420nm to 660nm). We transform reflectance R into absorption-to-scattering ratios K/S = (1-R)^2/(2R), mix proportionally by drop count and tinting strength, and invert back into CIE/sRGB color space.
How close is this browser simulation to real acrylic or watercolor paint?
Yes—dominant hue shifts and tinting dominance closely mirror studio acrylic and gouache behavior, though physical binders, pigment opacity/glazing, wet-to-dry acrylic darkening, and watercolor paper tooth still require physical swatch tests for fine art work.
Why do you score color matches using OKLab distance instead of RGB percentage?
OKLab measures perceptual uniformity the way human vision sees hue, chroma, and lightness differences, preventing misleading scores where a raw RGB difference sounds big mathematically but looks nearly identical to the eye.
How do monitor gamuts and True Tone settings affect color mixing games?
Screen sRGB gamuts cannot display ultra-saturated physical pigments like pure cobalt violet or neon acrylics, and OS filters like Night Shift or True Tone shift white balance—disable warm night modes when training your eye.