Automattic\WooCommerce\EmailEditor\Engine

Settings_Controller::translate_slug_to_color │ public │ WC 1.0

Translate a color slug to the color the palette gives it.

Theme_Controller::translate_slug_to_color().

Method of the class: Settings_Controller{}

No Hooks.

Returns

string. The color value, or an empty string for a slug the palette does not define.

Usage

$Settings_Controller = new Settings_Controller();
$Settings_Controller->translate_slug_to_color( $color_slug ): string;
$color_slug(string) (required)
Color slug, or a literal color.

Settings_Controller::translate_slug_to_color() code WC 11.3.0

public function translate_slug_to_color( string $color_slug ): string {
	return $this->theme_controller->translate_slug_to_color( $color_slug );
}