Clamps an array of RGBA values.
Description
Direct port of colord’s clampRgba function.
Parameters
$rgba
arrayrequired- The RGBA array to clamp.
Source
private static function colord_clamp_rgba( $rgba ) {
$rgba['r'] = self::colord_clamp( $rgba['r'], 0, 255 );
$rgba['g'] = self::colord_clamp( $rgba['g'], 0, 255 );
$rgba['b'] = self::colord_clamp( $rgba['b'], 0, 255 );
$rgba['a'] = self::colord_clamp( $rgba['a'] );
return $rgba;
}
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.