ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Color Transition between two Colors by Slider Control

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sebastian Martinez
Color Transition between two Colors by Slider Control
on May 12, 2020 at 6:30:43 pm

Dear Expression heroes,

my fourth question within a few day - expression rocks:

I want to change the fill of a Shape Layer by a Slider value from 0 to 100.

The Slider Effect is on a Null objekt. But also two Color Control effects, one for the Sliders value at 0, the other for the value at 100.

When animating the Slider between 0 and 100 the color change is supposed to be smooth.

I gave it a try but there was error only:

Col=thisComp.layer("Null 42").effect("Slider Control")("Slider");
color1=[thisComp.layer("Null 42").effect("Color 1")("Color")];
color2=[thisComp.layer("Null 42").effect("Color 2")("Color")];
linear (Col,0,100,color1,color2)


Whats wrong?

Thank you so much in advance,
Sebastian

Sebastian Martinez
CGI-Designer
Cologne, Germany
AE, AI, PS, 3ds max, C4d


Return to posts index

Andrei Popa
Re: Color Transition between two Colors by Slider Control
on May 12, 2020 at 6:55:35 pm

I guess your only mistakes are the square brackets. You don't need those, since the link to the color returns an array.

Col=thisComp.layer("Null 42").effect("Slider Control")("Slider");
color1=thisComp.layer("Null 42").effect("Color 1")("Color");
color2=thisComp.layer("Null 42").effect("Color 2")("Color");
linear (Col,0,100,color1,color2)


Andrei
My Envato portfolio.


Return to posts index

Sebastian Martinez
Re: Color Transition between two Colors by Slider Control
on May 12, 2020 at 7:01:47 pm

Andrei,

yes, the square braketts where too much. I just found it out by myself.

But thank you so much for replying!

Respects
Sebastian

Sebastian Martinez
CGI-Designer
Cologne, Germany
AE, AI, PS, 3ds max, C4d


Return to posts index


Sebastian Martinez
Re: Color Transition between two Colors by Slider Control
on May 12, 2020 at 6:59:18 pm

Stupid me. Too much braketts. This works now:

Col=thisComp.layer("Null 42").effect("Slider Control")("Slider");
color1=thisComp.layer("Null 42").effect("Color Control")("Color");
color2=thisComp.layer("Null 42").effect("Color Control 2")("Color");

linear (Col,0,100,color1,color2)


Anyhow, Thanks to all of you for helping out in this forum, especially Dan!

Take care
sebastian

Sebastian Martinez
CGI-Designer
Cologne, Germany
AE, AI, PS, 3ds max, C4d


Return to posts index

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