Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Change color with slider that is controlled by another slider...

Explorer ,
Sep 04, 2017 Sep 04, 2017

So I have this problem in my hand that I would like to change color from this -> 89a30af1a3.png

to that -> 8b52f6d7c5.png with slider -> 7d783bb405.png that is controlled by another slider -> 99bc614d02.png....

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.

5.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 04, 2017 Sep 04, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 04, 2017 Sep 04, 2017

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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 07, 2017 Sep 07, 2017

Still having trouble with this NikoWande? Let us know if you need more assistance.

Thanks,
Kevin

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 07, 2017 Sep 07, 2017

Couldn't get it working, but I decided to not to do what I was intending to do with that. Thank you though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 08, 2017 Sep 08, 2017
LATEST

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.

Screen Shot 2017-09-07 at 11.30.58 PM copy.png

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:

Screen Shot 2017-09-08 at 12.15.14 AM.png

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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines