List of utility methods to do Color Brightness Get
float | brightness(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); |
int | brightness(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; ... |
int | brightness(int rgb) brightness int r = (rgb >> 16) & 0xff; int g = (rgb >> 8) & 0xff; int b = rgb & 0xff; return (r + g + b) / 3; |