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

    Slider control for shape layer fill colour

    rachgouveia

      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)

        [48,26,23,0]

      else if (slider == 1)

        [30,157,139,1]

      else if (slider == 2)

        [0,122,135,1]

      else if (slider == 3)

        [149,82,20,1]

       

      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?