Hi,
in my project I am always working with Palettes for every effect to get the flexibility to influence all effects with changing and blending Palettes. As a standard I just use the rainbow palette so it is kind of not visible that I use them, since each input hue maps to the same output hue.
However palettes have an inbuilt saturation, so with the getColorFromPalette functions I always get fully saturated colors back (in the rainbow case) or I get those saturations back that are part of the palette in other cases.
What I would like is a chance to desaturate the colors in the same way, as I can also scale down the brightness already within the getColorFromPalette functions.
I looked through the code and it seems easy to add another scale8_video to the ones using CHSV pixels. A new parameter could just be added to the function call, defaulting to 255, so no change to the interface as such.
However, for CRGB its much different, as the saturation is not known. I checked the rgb2hsv_approximate function, but as seen in the comments it takes a lot of time and is focused on getting back the hue and not so much the saturation, in fact it does not work well for already low-saturated colors.
So what I am thinking about is not getting HSV back but just apply some destauration to an RGB so maybe some of the complicated steps in rgb2hsv_approximate can be left out.
Do you think that starting to work on that even makes sense? If yes, I might try to better understand this color conversion to come up with something. Or maybe there is an easier way that I am not seeing.