Method ColorInt.GetPerceivedBrightness
Overload
Calculates color's perceived brightness.
public static float GetPerceivedBrightness(int color, bool bgr)
Parameters
color (int)
Color in |
bgr (bool)
color is in |
Returns
float
0 to 1. |
Remarks
Unlike ColorInt.ToHLS and System.Drawing.Color.GetBrightness, this function uses different weights for red, green and blue components. Ignores alpha.