Page 1 of 1

Extracting data from colors

Posted: October 1st, 2010, 1:11 pm
by maximumrfan
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 :)

Re: Extracting data from colors

Posted: October 2nd, 2010, 2:10 am
by Paul Tuersley
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].