5 Replies Latest reply on Jul 17, 2018 6:02 AM by Trillion Astra

    Slider control for shape layer fill colour

    rachgouveia Level 1

      Hello, I'm trying to make a motion graphics template with colour as one of the options. Instead of the colour picker, I'd like to make it so it's on a slider and each number value is associated with a different colour. As of right now, I have a shape layer that is "parented" to a null object with the slider control effect on it.


      Right now my expression code is:

      slider = thisComp.layer("CONTROLS").effect("Slider Control")("Slider").value;

      if (slider == 0)


      else if (slider == 1)


      else if (slider == 2)


      else if (slider == 3)



      But when I change the slider to each of the values (0-3). the shape layer isn't changing to the colour I want. It's changing between white and a bright blue and yellow, which aren't the values I've put in. I am using RGBA values.


      Not sure what I'm doing wrong, can anybody help?