ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Editable colors

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Juan López
Editable colors
on Aug 20, 2019 at 1:47:21 pm

I have this expression to change color by a slider.
Now only you can edit when the value slider is 1, but if you change to value 2 or 3 it is impossible to edit.
how can I do to make editable every color?

Thank you

CS = Math.round(comp("Main").layer("Controls").effect("Swatches")("Slider").value);
tone = comp("Main").layer("Controls").effect("Color 01")("Color ");

if (CS == 2)
[0,204,255,0]/255
else if (CS == 3)
[255,150,56,0]/255
else if (CS == 4)
[255,168,0,0]/255
else if (CS == 5)
[255,0,0,0]/255
else if (CS == 6)
[255,241,178,0]/255
else
tone


Return to posts index

Andrei Popa
Re: Editable colors
on Aug 23, 2019 at 2:18:13 pm

Do you have multiple color control effects on the layer "Controls"? Like "Color 01", "Color 02", "Color 03"? If yes, your expression should be like this.

CS = Math.round(comp("Main").layer("Controls").effect("Swatches")("Slider").value);
comp("Main").layer("Controls").effect("Color 0"+CS)("Color");

Andrei
My Envato portfolio.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]