ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Linking Color Control to the Color value of a Solid Layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Joshua Dowdy
Linking Color Control to the Color value of a Solid Layer
on Aug 17, 2019 at 7:23:00 pm

First post!

I'm working on a project where the client needs 100's of copies of the same video but with titles and some graphics swapped out, and for the present issue, color schemes. I found Templater by Dataclay to swap out layers at scale, but I'm having an issue with the colors. Templater can swap out the colors of a solid using the Hex values, but as far as I know cannot be linked to an effect. So my idea is to have a few master solids that are linked to Templater, parent the color control panel to those solids, then parent the layers that need to change for each video to the color control. I know there must be a simple way to do this, but I'm brand new to using expressions and I can't find anything online so far. All it needs to do is pull the hex value from a solid and paste it in the hex value for the color controller. Any ideas?
Thanks!

Josh


Return to posts index

Tomas Bumbulevičius
Re: Linking Color Control to the Color value of a Solid Layer
on Aug 20, 2019 at 9:23:25 am

Hey Joshua, you could do the following:

1. From Templater, apply color hex to text layer, just a a string.
2. Then link expression from that string to Fill's effect.
3. Expression encode hex to color.

So this solution allows you to get rid of that 'solids' idea completely (which is limited, IMO, and not intuitive that much)

function hexToColor(theHex){

theHex = parseInt(theHex,16);

var r = theHex >> 16;
var g = (theHex & 0x00ff00) >> 8;
var b = theHex & 0xff;

return [r/255,g/255,b/255,1];

}


Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

Joshua Dowdy
Re: Linking Color Control to the Color value of a Solid Layer
on Aug 25, 2019 at 11:36:21 pm

Hi Tomas,
Sorry for the late response. Got swamped at work this last week and I'm just getting back around to solving this issue.
That's clever. I did not even think about that. Thanks for sharing. It seems like that would be less layers and parenting/linking layers to each other to deal with than my idea?

Which, btw, I did find an expression for that worked in a quick test I did:

target = comp("SOURCE COMP").layer("SOURCE LAYER");
samplePoint= [960,540]; // Sample location
sampleSize= [1,1]; // Sample area (in pixels)
target.sampleImage(samplePoint,sampleSize)


Josh


Return to posts index


Tomas Bumbulevičius
Re: Linking Color Control to the Color value of a Solid Layer
on Aug 27, 2019 at 9:32:20 am

Hey Joshua, while the above works, sampleImage will be less efficient in terms of processing speed, than direct expression to Fill effect.

I would suggest to test this out, compare and see the differences!

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

Joshua Dowdy
Re: Linking Color Control to the Color value of a Solid Layer
on Aug 28, 2019 at 2:44:05 am

Will do, thanks Tomas!

Josh


Return to posts index

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