The mixing methods are using the Lab color space.
This color space is designed to approximate the human vision, that's why a Lab mix is closer to our vision than a RGB mix.
It means that your colors will first be converted to this schema, what can be a bit heavy / slow if you use it inside an interval as requestAnimationFrame.
ColorMix is a global JS singleton object, so accessible from anywhere.
It contains some direct methods to mix several colors, get and set up a custom colors gradient, and blend a reference in this gradient.
It contains also two subclasses:
Read the documentation for more informations !
Sure! And open-sourced on GitHub. Feel free to star or fork. Pull-requests are welcome!