Changing a switch's colors according to its own value

A little question : let’s say we want to set colorFill to a value when click on. How can we do have access to the propriety colorFill, colorStroke etc. ?