Automattic\WooCommerce\Blocks\Utils

StyleAttributesUtils::get_preset_valuepublic staticWC 1.0

Get CSS value for color preset.

Method of the class: StyleAttributesUtils{}

No Hooks.

Returns

String. CSS value for color preset.

Usage

$result = StyleAttributesUtils::get_preset_value( $preset_name );
$preset_name(string) (required)
Preset name.

StyleAttributesUtils::get_preset_value() code WC 10.9.4

public static function get_preset_value( $preset_name ) {
	return "var(--wp--preset--color--$preset_name)";
}