Copy link to clipboard
Copied
So I have this problem in my hand that I would like to change color from this ->
to that -> with slider ->
that is controlled by another slider ->
....
If you didn't understand what I mean, I'll try to explain it better here. First of all I have this glow color that I want to be Orange and then change it to Blue when slider reaches certain amount (lets say that when slider = 0.00 Glow Color is Orange, but when slider = 100 color would be Blue). Then that slider value would be controlled via keyframes that are in the second slider "Output 3". Is this possible to do in any way, if so how?
Please feel free to ask questions if needed more details or more explanation. Thanks in advance.
Copy link to clipboard
Copied
You will have to add the interpolation to each color component separately using linear() interpolators such as
R=linear(slider,0,100,0,255);
G=linear(slider,0,100,0,255);
B=linear(slider,0,100,0,255);
[R,G,B,1]
Otherwise it doesn't really matter how you chain things across comps. the real trick is really to wire the components. that being said, it will probably still look awful, since there may be percentages that result in muddy colors, so consider using conventional color correction effects instead of expressions.
Mylenium
Copy link to clipboard
Copied
I thank you for your answer, but I'm sorry, unfortunately I didn't understand what you mean.
I used pickwhip from the color to select that slider and it gives me expression of
temp = effect("Slider Control")("Slider");
[temp, temp, temp, temp]
with this it makes color black when slider is at 0.00, but if it's like 0.01 it changes color to white.
(I'm quite bad with these more advanced expressions)
Copy link to clipboard
Copied
Still having trouble with this NikoWande? Let us know if you need more assistance.
Thanks,
Kevin
Copy link to clipboard
Copied
Couldn't get it working, but I decided to not to do what I was intending to do with that. Thank you though.
Copy link to clipboard
Copied
Expression color values are from zero to one. The array is four values [red, green, blue, alpha]
You have to supply a value for each color channel. The first step is to figure the range of your slider values. The second step is to figure out the 32bit values for the starting and ending color. You just go from orange to blue like you would changing hue because the values don't work in a linear way. You also have to figure out which way you want the colors to move. If it is just sliding up the color picker from one color to another then you'll need to take a look at all of the intermediate colors and do some really complex math to set up your expression so zero is orange and one hundred is blue.
I would approach the problem with a hidden layer that has a 50% gray layer with hue saturation applied. You set Hue/Saturation to Colorize and then use Effect>Expression>Color Control and the sampleImage method to read the color of this layer. You add an expression control slider to the layer you want to control the color to and tie that to the angle in Hue/Saturation Colorize. Then you simply drag a pickwhip from the Glow Color property to the Color Control Color. Figure out the minimum and maximum values you want and you get something like this:
No complicated math, a slider that changes the color in a predictable manner and the solution to your problem.
The expression changing the slider values to the appropriate angle for Hue Saturation:
t = thisComp.layer("Make Me Glow").effect("Slider Control")("Slider");
linear(t, 0, 100, 23, 190)
The expression for sampling the color of the hidden layer ('m just sampling the top right corner of the layer [10, 10] but it could be anywhere on the layer):
sampleImage([10, 10], radius = [.5, .5], postEffect = true, t = time)
And the pickwhip generated expression that ties the Glow Color to the Color Control on the hidden layer:
thisComp.layer("color").effect("Color Control")("Color")
Here's a comp for you to play with. I reversed the direction of the hue angle shift. See if you can figure out how I did it.
Dropbox - SliderGlowColor (CC (13)).aep​ (Note: your browser may add a .txt extension to the .aep file. Just delete it)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now