I wanted to be able to control the saturation of colors (to create some tints) from a color palette. Modifying the brightness was already implemented.
I’ve found in some forum (which seems offline now) a while ago how to desaturate rgb with lerp.
I tried to optimize it by using the functions in lib8tion, but there might be faster options.
The code on gist:
I put some questions in the comments. Hope @Mark_Kriegsman can take a look at it.
I didn’t took luminance in account, which might improve the effect (however in hsv luminance factors don’t seem to be used as well). Any ideas on that are welcome. I don’t have a clue how to implement those factors within fixed point math.
I’ve now implemented in my local Fastled copy, but it might be interesting to add it to colorutils?