WP_Duotone::colord_clamp_hsla
Clamps an array of HSLA values.
Direct port of colord's clampHsla function.
Method of the class: WP_Duotone{}
No Hooks.
Returns
Array. The clamped HSLA array.
Usage
$result = WP_Duotone::colord_clamp_hsla( $hsla );
- $hsla(array) (required)
- The HSLA array to clamp.
Changelog
| Since 6.3.0 | Introduced. |
WP_Duotone::colord_clamp_hsla() WP Duotone::colord clamp hsla code WP 6.8.3
private static function colord_clamp_hsla( $hsla ) {
$hsla['h'] = self::colord_clamp_hue( $hsla['h'] );
$hsla['s'] = self::colord_clamp( $hsla['s'], 0, 100 );
$hsla['l'] = self::colord_clamp( $hsla['l'], 0, 100 );
$hsla['a'] = self::colord_clamp( $hsla['a'] );
return $hsla;
}