I think I've found a fix (once and for all) for the RGBW-RGB screen conversion problem (I did it in Excel):
1. Take the 4 RGBW values (Ra, Ga, Ba, Wa).
2. Store the maximum of these values (RGBWmax).
3. Create intermediate RGB values by summing each colour and the white value (Rb, Gb, Bb). This can create values larger than 255.
4. Store the maximum of the intermediate values (RGBmax).
5. Calculate the final RGB values by dividing by the second maximum and multiplying by the first (Rx, Gx, Bx). This maintains the previous highest RGBW value.
Rx=(Ra+Wa)/RGBmax*RGBWmax
Gx=(Ga+Wa)/RGBmax*RGBWmax
Bx=(Ba+Wa)/RGBmax*RGBWmax
This does several things:
1. White light only gives a range of greys 0-#FF (good).
2. RGB greys are also maintained 0-#FF (good).
3. Adding white on top of RGB greys moves the numbers towards #FF (good).
4. Adding more white to RGB white makes no difference (bad).
5. Adding white to medium brightness colours makes them brighter and more washed out (good).
6. Adding white to a fully saturated color (eg. 255 red) brings up the values of the others (good), but does not increase the saturated colour further above #FF, obviously (bad).
To adapt this for amber and UV colours, the following function would be used:
Rx=(Ra+Wa+Aa x AweightR+UV x UVweightR)/RGBmax*RGBWAUVmax
Gx=(Ga+Wa+Aa x AweightG+UV x UVweightG)/RGBmax*RGBWAUVmax
Bx=(Ba+Wa+Aa x AweightB+UV x UVweightB)/RGBmax*RGBWAUVmax
Aweight is (1, 0.75, 0) and UVweight is (0, 0.58, 0.83) to reflect the lamp colour.
In the spreadsheet, column N shows how adding white changes the RGB base colour by 5 levels (0, 64, 128, 191, 255). This is what you would get in the 2D window as the white faders go up.
All that is left now is to implement the equtions without using floats in an efficient manner. Easy!
http://www.boxy.biz/RGBW_equation2.xlsx
http://www.boxy.biz/RGBA_equation2.xlsx
http://www.boxy.biz/RGBUV_equation2.xlsx