I really didn't want to have to write this but I'm stuck and the key terms to search with are very vague.
So I've used a version of this expression before on many different projects, but I am now trying to get it to work for colour.
I want to basically have the lightness of the colour divide among the total layers in a comp.
So for example 10 layers, the lightness will increase in increments of .1
And adjust dynamically as more layers are added.
Now I've gotten this work up until I add the *i
For whatever reason multiplying by the index breaks it. No error though, just reverts to default value. I remove the *i I get the result of 1/n
Is index broken? Am I broken?
I created a more hackery way for the job I was doing, but now I just want to know how I was being stupid.
n = thisComp.numLayers;
i = index;
h = 0
s = 0;
l = (1/n)*i;
a = 0;
HSL = [h,s,l,a];