Skip to Content

color_brightness()

Check the brightness of a color.

PHP April 26, 2017

Usage

PHP
nebula()->color_brightness($hex)

Parameters

$hex
(Required) (String) The color HEX code
Default: None

Request or provide clarification »

Additional Notes

This function returns an integer between 0 (darkest) to 255 (lightest).

256 is returned to indicate false in this case.

Source File

Located in /libs/Utilities/Utilities.php on line 970.

No Hooks

This function does not have any filters or actions available. Request one?
PHP
        public function color_brightness($color){return $this->luminance($color);}

Override

This function can not be short-circuited with an override filter. Request one?