-
Controlling color and scale with a Null’s position?
Hi everyone!
I’m making a timeline where when I move a Null, data panels attached to the timeline scale in size.
I’ve managed to find a script to do this (which I assign to the scale parameter of the data panels):So when I move the Null (called Scale_Control) towards the panels the panels grow! Great. But what I want to do as well is change their color as they grow in size and go back to their original color when the Null has passed-on. I’ve looked everywhere and know I need to convert the colors to HLS with an array (I think) and use a similar approach to the scale expression above but I can’t get it to work.
Hope you can help?mouse_layer = thisComp.layer("Scale_Control");//Mouse layer
beginScale = 75;//Scale begins at this
endScale = 100;//Scale ends at this
beginDistance = 200;//Distance to begin magnifying in pixels
endDistance = 0;//Distance to end magnifying in pixels
//--Don't modify below here
dis = length(this.position, mouse_layer.position);
val = ease(dis, beginDistance, endDistance, endScale, beginScale);
[val, val]