Java Utililty Methods Color Brightness Get

List of utility methods to do Color Brightness Get

Description

The list of methods to do Color Brightness Get are organized into topic(s).

Method

floatbrightness(int color)
Returns the brightness component of a color int.
int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = color & 0xFF;
int V = Math.max(b, Math.max(r, g));
return (V / 255.f);
intbrightness(int red, int green, int blue)
brightness
float brightness;
float intensity;
float light;
float luminosity, maxprimary, minprimary;
red = red << 8;
green = green << 8;
blue = blue << 8;
intensity = (red + green + blue) / 3;
...
intbrightness(int rgb)
brightness
int r = (rgb >> 16) & 0xff;
int g = (rgb >> 8) & 0xff;
int b = rgb & 0xff;
return (r + g + b) / 3;