What you need to do is to write your slider code in the same way as the pattern code, then treat it just like a pattern.
This means the code should look at the sliders and set the colours just once and then return.
What you need to do is to write your slider code in the same way as the pattern code, then treat it just like a pattern.
This means the code should look at the sliders and set the colours just once and then return.