APP_PHPColors::foreground( int $amount = self::DEFAULT_ADJUST, string $threshold = 130 )
Checks the lightness of given color, and if it passes the $threshold
of lightness, it returns the darker color. Otherwise, it returns the lighter color.
Package
Description Description
Use this function to dynamically output a foreground color based on a given background color.
Parameters Parameters
- $amount
(int) (Optional) The amount of lightness/darkness that needs to be adjasted to a given color.
Default value: self::DEFAULT_ADJUST
- $threshold
(string) (Optional) Threshold of lightness to check against.
Default value: 130
Return Return
(string)