Skip to main content
Atte J.
Inspiring
June 4, 2020
Answered

A color sampling tool?

  • June 4, 2020
  • 2 replies
  • 1196 views

Hello community!

 

I'm looking for a tool / plugin /script / procedure / expression /whatever that would sample the color of a user defined pixel in each frame of the comp so I could use that to match the color of something else to that color. Is there such a thing? One might think this is a common thing to do but I've never seen it anywhere...

 

Thanks for any advice!

This topic has been closed for replies.
Correct answer Martin_Ritter

In an expression, you can use

sampleImage(point, radius = [.5, .5], postEffect=true, t=time)

to do so.

 

With the point control you can easily let the user select a certain pixel. Return value is a 4-item array [r,g,b,a], which you can use to drive the other thing.

 

Read more about this in expression reference:

https://helpx.adobe.com/after-effects/using/expression-language-reference.html

 

*Martin

2 replies

Martin_Ritter
Martin_RitterCorrect answer
Legend
June 4, 2020

In an expression, you can use

sampleImage(point, radius = [.5, .5], postEffect=true, t=time)

to do so.

 

With the point control you can easily let the user select a certain pixel. Return value is a 4-item array [r,g,b,a], which you can use to drive the other thing.

 

Read more about this in expression reference:

https://helpx.adobe.com/after-effects/using/expression-language-reference.html

 

*Martin

Mylenium
Legend
June 4, 2020

Given how AE works there cannot be some generic color sampling tool as any corrections you plan on doing would have to be applied via effects, anyway. That being the case, chances are you would need an expression with the sampleImage() function linked to the parameters of color correction effects or some such thing. There's no generic answer here. You have to be very specific and explain what you are trying to match and how you plan on applying the color.

 

Mylenium

Atte J.
Atte J.Author
Inspiring
June 4, 2020

Very simple really, take the color value of a certain pixel so I can link it to whatever accepts a color value. And do this in every frame.

 

Extracting that color info automatically in every frame is the core of my question. The rest is easy.