PRUint8 luminosity = ((RED_LUMINOSITY * aRed) / 100) + ((GREEN_LUMINOSITY * aGreen) / 100) + ((BLUE_LUMINOSITY * aBlue) / 100);
PRUint8 luminosity = NS_GetLuminosity(NS_RGB(aRed, aGreen, aBlue)) / 1000;
int NS_GetBrightness(PRUint8 aRed, PRUint8 aGreen, PRUint8 aBlue){  PRUint8 intensity = (aRed + aGreen + aBlue) / 3;  PRUint8 luminosity =    ((RED_LUMINOSITY * aRed) / 100) +    ((GREEN_LUMINOSITY * aGreen) / 100) +    ((BLUE_LUMINOSITY * aBlue) / 100);   return ((intensity * INTENSITY_FACTOR) +          (luminosity * LUMINOSITY_FACTOR)) / 100;}