wp_tinycolor_rgb_to_rgb( array $rgb_color ): array

This function has been deprecated.

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Rounds and converts values of an RGB object.

Description

Direct port of TinyColor’s function, lightly simplified to maintain consistency with TinyColor.

Parameters

$rgb_colorarrayrequired
RGB object.

Return

array Rounded and converted RGB object.

Source

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,
	);
}

Changelog

VersionDescription
6.3.0This function has been deprecated.
5.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.