Changing the color of a switch

You can set the switch button colour in its own settings within the editor, then you can always have it do something when it is clicked, like another box turns green etc.
https://www.wix.com/corvid/reference/$w.Switch.html#checked

Something like this…

export function switch1_click(event) {
if ($w('#switch1').checked) {
$w("#colourBox").style.backgroundColor = "green";
} else {
$w("#colourBox").style.backgroundColor = "grey"; 
}
}