wp_tinycolor_rgb_to_rgb()
Deprecated since 6.3.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
Rounds and converts values of an RGB object.
Direct port of TinyColor's function, lightly simplified to maintain consistency with TinyColor.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Returns
Array. Rounded and converted RGB object.
Usage
wp_tinycolor_rgb_to_rgb( $rgb_color );
- $rgb_color(array) (required)
- RGB object.
Changelog
| Since 5.8.0 | Introduced. |
| Deprecated since | 6.3.0 |
wp_tinycolor_rgb_to_rgb() wp tinycolor rgb to rgb code WP 6.9.1
function wp_tinycolor_rgb_to_rgb( $rgb_color ) {
_deprecated_function( __FUNCTION__, '6.3.0' );
return array(
'r' => wp_tinycolor_bound01( $rgb_color['r'], 255 ) * 255,
'g' => wp_tinycolor_bound01( $rgb_color['g'], 255 ) * 255,
'b' => wp_tinycolor_bound01( $rgb_color['b'], 255 ) * 255,
);
}