A WordPress-centric search engine for devs and theme authors

wp-includes/block-supports/duotone.php › WordPress File

Duotone block support flag.

Function Short description
wp_register_duotone_supportRegisters the style and colors block attributes for block types that support it.
wp_render_duotone_supportRender out the duotone stylesheet and SVG.
wp_tinycolor_bound01Takes input from [0, n] and returns it as [0, 1].
wp_tinycolor_hsl_to_rgbConvert an HSL object to an RGB object with converted and rounded values.
wp_tinycolor_hue_to_rgbHelper function for hsl to rgb conversion.
wp_tinycolor_rgb_to_rgbRound and convert values of an RGB object.
wp_tinycolor_string_to_rgbParses 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.