Title: wp_tinycolor_rgb_to_rgb
Published: August 8, 2023
Last modified: August 20, 2026

---

# wp_tinycolor_rgb_to_rgb( array $rgb_color ): array

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#wp--skip-link--target)

This function has been deprecated since 6.3.0.

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

Rounds and converts values of an RGB object.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#description)󠁿

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#parameters)󠁿

 `$rgb_color`arrayrequired

RGB object.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#return)󠁿

 array Rounded and converted RGB object.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/deprecated.php#L4893)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/deprecated.php#L4893-L4901)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_tinycolor_bound01()](https://developer.wordpress.org/reference/functions/wp_tinycolor_bound01/)`wp-includes/deprecated.php` |

Takes input from [0, n] and returns it as [0, 1].

  | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

| Used by | Description | 
| [wp_tinycolor_string_to_rgb()](https://developer.wordpress.org/reference/functions/wp_tinycolor_string_to_rgb/)`wp-includes/deprecated.php` |

Parses hex, hsl, and rgb CSS strings using the same regex as TinyColor v1.4.2 used in the JavaScript. Only colors output from react-color are implemented.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_tinycolor_rgb_to_rgb/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.3.0](https://developer.wordpress.org/reference/since/6.3.0/) | Deprecated.  | 
| [5.8.0](https://developer.wordpress.org/reference/since/5.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_tinycolor_rgb_to_rgb%2F)
before being able to contribute a note or feedback.