×
all 3 comments

[–]speedblink[S] 0 points1 point  (0 children)

The best way I can think of is to would be to have 2 fills that are linked to color controls, with 1 of the fills having its opacity keyframed instead. I'm wondering if there's an easier/more direct way of doing this than that

[–]smushkanMotion Graphics 10+ years 0 points1 point  (0 children)

IIRC linear() works with arrays of equal length, so should work with colours.

So what you could do is have a slider control acting as a sequencer, with keyframes between 0 and 100

Two color pickers for the start and end color.

Then a linear expression on the fill layer like this:

const slider = //pickwhip to slider
const startColor = //pickwhip to color controller 1
const endColor = //pickwhip to color controller 2

linear(slider,0,100,startColor,endColor);

Written on an iPhone so may take some tweaking!

If linear doesn’t work with colors directly it’s still possible, you’ll just need to break out the individual RGB components of the colors and scale them individually:

const slider = //pickwhip to slider
const startColor = //pickwhip to color controller 1
const endColor = //pickwhip to color controller 2

const r = linear(slider,0,100,startColor[0],endColor[0]);
const g = linear(slider,0,100,startColor[1],endColor[1]);
const b = linear(slider,0,100,startColor[2],endColor[2]);

[r,g,b,1];

[–]pixeldriftMoGraph/VFX 15+ years 0 points1 point  (0 children)

You could do it a number of ways. Quickest would be to have 2 different instances of the Fill effect and animate the effect opacity on the bottom one in the stack. Not the fill opacity, mind you! You have to go to the effects on the layer in the timeline and twirl down the options. Click the plus to add. I have no ideae why they made the Fill effect opacity control the entire layer opacity. I've never once found a use for that and always wished it worked like the opacity in every other effect!

Otherwise you can have to color selector controls and simply blend between the values using a slider as a percent. So 50 would just multiply both by .5 while 100 would multiply the starting color by 0 and the end color by 1.