I am calculating luminosity in Javascript using:
luminosity = (5036060 * backgroundColor.red + 9886846 * backgroundColor.green + 1920103 * backgroundColor.blue) >> 24;
For the case where the color is white, ie all 3 RGB values are 255, I am getting a result of -1. I tested explicitly and in Javascript the value "4294967295 >> 24" is -1.
Why?