wp_tinycolor_string_to_rgb


wp_tinycolor_string_to_rgb ( $color_str )

Access:
  • private
Parameters:
  • (string) color_str CSS color string.
See:
Returns:
  • (array) RGB object.
Defined at:

Description

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 and the alpha value is ignored as it is not used in duotone.Direct port of TinyColor's function, lightly simplified to maintain consistency with TinyColor.

Related Functions

wp_tinycolor_rgb_to_rgb, wp_tinycolor_hsl_to_rgb, wp_tinycolor_hue_to_rgb, wp_tinycolor_bound01, wp_timezone_string

Top Google Results

User discussions

wpseek mobile