heronarts / LX

Core library for 3D LED lighting engines
https://chromatik.co/
Other
41 stars 25 forks source link

Bug fix: byte order W sending minimum rgb value instead of composite. #41

Closed jkbelcher closed 2 years ago

jkbelcher commented 2 years ago

Looks like a copy and paste error from the RGBW section below it. This was sending the minimum value of (r,g,b) to w which on a fully saturated color was often zero. This fix sets it to the average, although some sources online say it should be an uneven weighting formula such as (W = R^gamma .2126 + G^gamma .7152 + B^gamma * .0722).