Wanting to use a bang to change the colour of a slider's background?

Moosey6878's icon

I am trying to make a sampling system that uses a graphics tablet. This table is controlling certain parameters, one of which is sample speed. The speed change is shown on a series of sliders which i want to be highlighted in a different colour when each is selected so the user knows what they are using.

Any ideas on how to code the background colour to change on selection?

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.
Moosey6878's icon

Thank you very much, been a big help