-
Changing ‘Tint’ value based on Dropdown menu/Expressions
I have a project that is in a 2 colour style. I’m going to need to do versions where the primary colour changes from Pink to Blue against black. I’m just trying to work out a way to simplify this and only change the value on one layer.
At present I have my solid background which is set to white.
I have a tint effect (will come back to this shortly).
I have a null object, renamed to ‘Control’ and on this layer I have a dropdown menu control renamed ‘Colour’ with the values ‘Pink’ and ‘Blue’
On my tint effect, I’ve added an expression under the ‘Map White to’ stopwatch, with the following details:
dropMenu = thisComp.layer("Control").effect("Colour")("Menu").value;
ColOpt = ["FF2BFE", "4C9FF7"];ColOpt[dropMenu-1]
However this isn’t working and I’m getting the error
Error: invalid numeric response (divide by zero?)Can anyone offer any guidance as to where I might be going wrong here? Is there an alternative way to achieve the result I’m going for?