Copy link to clipboard
Copied
Hey all,
This may be a pretty simple answer but I'm new to scripting, and I have a layer with the effect "Fill" and I would like to change the color value in my script. Am I not accessing the effect correctly or I am putting in the wrong value?
app.project.item("Controls").layers("Colors").effect("Fill")(3) == '#ffffff';
So the comp is called "Controls", it has a solid inside it called "Colors" and the effect is "Fill". I am trying to change it to white.
Thanks in advance!
as far as I know, you always have to convert your hex values to rgb for extendScript.
where layer(1) is your solid and [1,1,1] is any RGB value (0-1 range) you want --
app.project.activeItem.layer(1).property('Contents').property(3).property('Color').setValue([1,1,1]);
Copy link to clipboard
Copied
as far as I know, you always have to convert your hex values to rgb for extendScript.
where layer(1) is your solid and [1,1,1] is any RGB value (0-1 range) you want --
app.project.activeItem.layer(1).property('Contents').property(3).property('Color').setValue([1,1,1]);
Copy link to clipboard
Copied
Cool, the RGB and the 'setValue' were the things I needed! Thanks!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now