wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_tinycolor_rgb_to_rgb › WordPress Function

Depuis5.8.0
Dépréciée6.3.0
wp_tinycolor_rgb_to_rgb ( $rgb_color )
Accès:
  • private
Paramètres:
  • (array) $rgb_color RGB object.
    Requis: Oui
Liens:
Retourne:
  • (array) Rounded and converted RGB object.
Défini(e) dans:
Codex:

Rounds and converts values of an RGB object.

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


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