JXtension - Color.getLuminance()

Purpose:
Give the user the ability to get a rough approximation of the luminance of a specific 24-bit color.

Returns:
Returns a number which represents the luminance of the color.  The number will be greater than or equal to 0 and less than or equal to 255.  A light color has a high luminance value.  A dark color has a low luminance value.

Example #1:
The following will instantiate a color using three random decimal digits.  After that, the luminance of the constructed color will be displayed:

 

See also: