-
How to change solid color using slider control ?
Hello,
I have a solid layer and I want to change its color using a slider control.
example: (if value = 0, color = yellow //// if value = 1, color = red)
I tried using the below expression that I found in this thread:
slider = Math.floor(effect("Slider Control")("Slider").value);
if (slider == 0)
[.5,.5,.5,1] // medium grey
else if (slider == 1)
[0,1,0,1] // green
else [1,0,0,1] // red
but I am getting an error that the expression result must be of dimension 1, not 4.So how can I do this ?