ColorHelper
in package
Class ColorHelper
Tags
Table of Contents
- getLuminance() : int
- Retrieves the percentage of the relative luminance (based on the photometric definition of luminance) of a passed color.
Methods
getLuminance()
Retrieves the percentage of the relative luminance (based on the photometric definition of luminance) of a passed color.
public
static getLuminance(StringType $color) : int
Parameters
- $color : StringType
-
Six-digit hexadecimal color definition (e.g: '002337').
Tags
Return values
int —Color luminance percentage.