Skip to Content
Menu

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.

Was this page helpful? Yes No


    A feedback message is required to submit this form.


    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!

    Source File

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

    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?