WP_Duotone::colord_clamp_rgba()
Clamps an array of RGBA values.
Direct port of colord's clampRgba function.
Method of the class: WP_Duotone{}
No Hooks.
Return
Array
. The clamped RGBA array.
Usage
$result = WP_Duotone::colord_clamp_rgba( $rgba );
- $rgba(array) (required)
- The RGBA array to clamp.
Changelog
Since 6.3.0 | Introduced. |
WP_Duotone::colord_clamp_rgba() WP Duotone::colord clamp rgba code WP 6.7.2
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; }