Automattic\WooCommerce\Blocks\Utils

StyleAttributesUtils::get_preset_value()public staticWC 1.0

Get CSS value for color preset.

Method of the class: StyleAttributesUtils{}

No Hooks.

Return

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 9.4.2

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