-
Expression Error!!
I was working with AE last night with an expression,the purpose of this expression,was simply for the background layer to have the opposite color of a shape layer.First, I hooked up three slider control effects to a null and renamed them each as red,green,blue.Then i made the expression in the shape layer’s fill property as,
red = thisComp.layer(“Null 1”).effect(“red”)(“Slider”);
green = thisComp.layer(“Null 1”).effect(“green”)(“Slider”);
blue = thisComp.layer(“Null 1”).effect(“blue”)(“Slider”);
alpha = 1;
[red,green,blue,alpha]
This worked out fine, i also added the wiggle expression to the sliders and everything went well until when i wanted the background layer to have the opposite color the shape layer and so here is the expression
red = thisComp.layer(“Null 1”).effect(“red”)(“Slider”);
green = thisComp.layer(“Null 1”).effect(“green”)(“Slider”);
blue = thisComp.layer(“Null 1”).effect(“blue”)(“Slider”);
alpha = 1;
hsl = rgbToHsl([red,green,blue,alpha)];
hsl[0] += .5;
if (hsl[0]>1) (hsl[0] -= 1);
rgb = hslToRgb(hsl);
rgb