This started as a REPL session to try to understand why our Goodbeast.com colors look so much better when a friendly designer used them than when I did (other than his exceptional sense of color). I realized that he was "overlaying" them on top of themselves, effectively increasing both brightness and saturation.
This all came together as a shader, forked to start and mostly credited. https://www.shadertoy.com/view/DtKyRc
The overlay function in the javascript version can be thought of more as an "S curve" in a design program - it increases