Mixing two colors “naturally” in javascript

I dedicated 3-4 days to this question. It’s a really complex problem.

Here is what you can do if you want to mix two colors “naturally”:

  1. CMYK mixing: it’s not the perfect solution, but if you need a solution now, and you don’t want to spend months with learning about the subject, experimenting and coding, you can check this out: https://github.com/AndreasSoiron/Color_mixer

  2. Implementing the Kubelka-Munk theory. I spent a lot of time reading about it, and trying to understand it. This should be the way to go if you want a professional solution, but it needs 6 parameters (like reflectance, absorption, etc.) for each colors you want to mix. Having R, G, B isn’t enough. Implementing the theory isn’t hard, but getting those parameters you need about each color seems to be the missing part. If you figure it out how to do it, let me know 🙂

  3. Experimental: you can do something what the developers of the ipad app: Paper have done. They manually selected 100 pairs of popular colors and eyeball-tested how they should blend. Learn more about it here.

I personally will implement the CMYK mixing for the moment, and maybe later, if I have time I’ll try to make something like the guys at Fiftythree. Will see 🙂

Leave a Comment