Function __global->rgb_luminance
Definitions
sources/themewizard.php
- Calculate the luminance of a colour.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: float
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $r | float | No | No | required parameter | N/A | N/A | Red |
| $g | float | No | No | required parameter | N/A | N/A | Green |
| $b | float | No | No | required parameter | N/A | N/A | Blue |
Returns
- The luminance of the provided colour
- Type: float
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Calculate the luminance of a colour.
*
* @param float $r Red
* @param float $g Green
* @param float $b Blue
* @return float The luminance of the provided colour
*/
function rgb_luminance(float $r, float $g, float $b) : float
* Calculate the luminance of a colour.
*
* @param float $r Red
* @param float $g Green
* @param float $b Blue
* @return float The luminance of the provided colour
*/
function rgb_luminance(float $r, float $g, float $b) : float

