Clamps an array of HSLA values.
Description
Direct port of colord’s clampHsla function.
Parameters
$hsla
arrayrequired- The HSLA array to clamp.
Source
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;
}
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.