Is there a way to change value of Elementor Color Control with javascript?
I have this code:
$this->add_control(
'themeBgColor',
[
'label' => esc_html__( 'Theme main color', E_VPL_TEXTDOMAIN ),
'type' => \Elementor\Controls_Manager::COLOR,
'scheme' => [
'type' => \Elementor\Core\Schemes\Color::get_type(),
'value' => \Elementor\Core\Schemes\Color::COLOR_1,
],
'alpha' => false,
'classes' => 'ap-color-field',
]
);
This ads custom class which I can use to find this element in elementor-controls panel, but how would I change this value in editor? This is not an input field, its a button which opens global colorpicker.
The reason I want this is because I have several skin presets for my custom widget in Elementor, they they different settings for colors and these values repeat (so each skin has 20 different colors). So I dont want to duplicate controls in _register_controls function for each skin.