Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Link and limit color hue to slider after effects

  • Link and limit color hue to slider after effects

    Posted by Adriana González on November 17, 2015 at 4:07 pm

    ¡Hello!
    I’m new to expressions so I will try and explain myself the best way I can.

    I have a Color Balance(HLS) linked to a slider control, and I would like to limit the amount of colors I can get when moving the slider. I’m not interested in all the range of the hue, just 7 numbers to get 7 specific colors.

    The idea is that I want my client to be able to easily change the color of a specific element in the screen, but within a limited and specified number of colors.

    Thanks in advance! and sorry if I have bad grammar. English is not my main languaje.

    comp("*BUMPER_QuienEsQuien").layer("COLORES_ESOS").effect("ESO_04")("Slider")

    Kalleheikki Kannisto replied 10 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kalleheikki Kannisto

    November 18, 2015 at 7:51 pm

    If you are using the Hue/Saturation Effect with “Colorize” turned on and it is on the same layer as your slider, the expression for “Colorize Hue” is as follows:

    hue_set=[10,20,30,40,50,60,70];// <<< insert your selected 7 hue angles here selector=Math.floor(effect("Slider Control")("Slider")); if (selector<1){selector=1}; if(selector>7){selector=7}; hue_set[selector-1]

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy