Control algorithm of white on GRBW and RGBW etc?

tl;dr How does the code convert an HSV(hue, sat, val) or RGB function call into [0,255] values of G,R,B and WW, for 4 color strands?

I love that the PB supports my 6812 RGBWW strands, but how does the code convert an HSV(hue, sat, val) call into [0,255] values of G,R,B and WW? A link to code or a reference would be fine if you don’t want to go into details.
I am asking because I am making calm patterns that are mostly WW with just a liminal amount of other colors rotating in and out for a subtle effect.
The easiest algorithm I can think of would be to convert (hue, sat, val) → (r,g,b) and then let m = min(r,g,b) and send (r-m, g-m, b-m, m) to the pixel but that would mess up so many things like gamma, distort the perceived value, shift luminosity, etc. I get that there is probably no way to do this exactly since you are embedding a 3-manifold in a 4d space (r,g,b into r,g,b,w for non-mathy types) and the white typically has very different luminosity and different strands have different temperature/color values (warm vs cold white).
Bonus points if there are any literature, videos, or papers about this?

In general, one of the biggest advantages of the PixelBlaze platform is you simply don’t have to do the work you’re describing. @wizard has written the conversion into the backend at a low level, and as long as you use the regular functions to set the color(s) the way you want, the balancing between the different RGBWW LEDs should “just work”.

Is that not the case for you, or does it not work when you test it with your strips?

@afinefellow - I am not 100% sure of the details of your use case, but I have modified one or two of the patterns that I use to be very much pastel shades (near white) rather than bold colours. This I did simply by limiting the saturation value in my code to around 0.1. If your patterns need to modulate the saturation, then just set some scaling factor so that the final value is in a suitable range, such as 0 to 0.1 and as @ZacharyRD says, you can then just let the PB software take care of the rest.

In my case my LEDs are simply RGB but I find this approach gives a very pleasing result.

Hi @afinefellow ,

You’ve pretty much guessed it. Conversion to pixel data is straightforward.

From the LED strips I have tested, they boost the current to the white element and it gives a roughly equivalent amount of light as R+G+B. I haven’t measured this and characterized it over a wide range of LED strips, but it seems to work well.

Pixelblaze doesn’t currently do gamma or color correction to attempt to reproduce accurate colors over the wide range of LEDs out there. There’s a lot of variation, from chipset to LED die used, binning, color temperature of white elements, etc., and many chipsets now implement their own gamma correction.