Function __global->rgb_from_hsv_contrast
Definitions
sources/themewizard.php
- Find an RGB colour with the specified contrast ratio which contrasts the specified HSV colour.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $h | float | No | No | required parameter | N/A | N/A | Hue |
| $s | float | No | No | required parameter | N/A | N/A | Saturation |
| $v | float | No | No | required parameter | N/A | N/A | Value |
| $ratio | float | No | No | required parameter | N/A | N/A | The required contrast ratio of the returned RGB colour compared to the provided HSV |
Returns
- RGB colour
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find an RGB colour with the specified contrast ratio which contrasts the specified HSV colour.
*
* @param float $h Hue
* @param float $s Saturation
* @param float $v Value
* @param float $ratio The required contrast ratio of the returned RGB colour compared to the provided HSV
* @return string RGB colour
*/
function rgb_from_hsv_contrast(float $h, float $s, float $v, float $ratio) : string
* Find an RGB colour with the specified contrast ratio which contrasts the specified HSV colour.
*
* @param float $h Hue
* @param float $s Saturation
* @param float $v Value
* @param float $ratio The required contrast ratio of the returned RGB colour compared to the provided HSV
* @return string RGB colour
*/
function rgb_from_hsv_contrast(float $h, float $s, float $v, float $ratio) : string

