Extracting data from colors

Moderators: Disciple, zlovatt

Post Reply
maximumrfan
Posts: 8
Joined: September 16th, 2010, 8:13 pm

I wanted to ask two questions.
How can I get an expression to show red/blue/green/alpha channel amounts in a slider control
How can I use expressions to average colors, and how to display the color in a color control.
Thanks,
Matt :)
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

Can you describe what you're trying to do a bit more. Where do you want to get the colors from? An effect's color swatch property or sampled from the comp?

A color swatch property value is a 4D array [r,g,b,a] so you would access the individual dimensions in the same way as with other multi dimensional properties, e.g. value[0] to value[3].
Post Reply