phpDocumentor

ColorHelper
in package

Class ColorHelper

Tags
category

System

subpackage

Helpers

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
throws
UnexpectedValueException

On invalid color definition.

Return values
int

Color luminance percentage.

Search results