ColorHelper

Class ColorHelper

category

System

package

Extensions

subpackage

Helpers

Methods

Retrieves the percentage of the relative luminance (based on the photometric definition of luminance) of a passed color.

getLuminance(\StringType $color) : integer
static
Throws
\UnexpectedValueException

On invalid color definition.

Arguments

$color

\StringType

Six-digit hexadecimal color definition (e.g: '2196F3').

Response

integer

Color luminance percentage.