Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Limiting color selections

  • Limiting color selections

    Posted by Ernest Rosado on May 2, 2019 at 5:04 pm

    Hi all,

    I’m designing a .mogrt template in AE to use in Premiere. This template is to ensure that we’re following our brand guidelines, and I want to offer the Premiere editors the ability to select the color of the text elements in the template, but limit the selection to one of our 5 brand colors. I can easily add a full color control to the controller layer for the template, but that will give the editors the ability to deviate from the pre-selected colors. I’m kind of at a loss as to how to tackle this logically and with expressions.

    Any ideas as to how to approach this? Thanks in advance for any thoughts you might have.

    Ernest Rosado replied 7 years ago 2 Members · 4 Replies
  • 4 Replies
  • Ernest Rosado

    May 2, 2019 at 5:54 pm

    Thanks, but I’m looking for a technical solution rather than a policy-based one.

  • Ernest Rosado

    May 2, 2019 at 8:26 pm

    After working on this all day, I cobbled together a solution.

    I added an adjustment layer (called “Controller”) with a slider control (called “ColorPicker”) and a Hue/Saturation control. I enabled Colorize on the Hue/Saturation and entered an expression for hue, saturation and brightness. I am only showing hue here for the sake of brevity. Replace xxx, yyy, and zzz with the h/s/l values of your chosen colors.


    var cp = Math.round(thisComp.layer("Controller").effect("ColorPicker")(1));
    if (cp<2){
    hue=xxx;
    sat=yyy;
    bri=zzz;
    }
    if (cp>=2 && cp < 3) {

    hue=xxx;
    sat=yyy;
    bri=zzz;
    }

    if (cp>=3 && cp < 4) {
    hue=xxx;
    sat=yyy;
    bri=zzz;
    }

    if (cp>=4 && cp <= 5) {
    hue=xxx;
    sat=yyy;
    bri=zzz;
    }

    hue;

    The last line should be changed to sat or bri depending on which item you’re modifying.

    Anyway, I added the slider value to my mogrt and now the video editors can drag the slider to select one of the pre-chosen colors.

  • Walter Soyka

    May 2, 2019 at 9:48 pm

    Here’s a related approach that gives you more intuitive control in the AEP:

    13317_colorpaletteselectormogrt.aep.zip

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Ernest Rosado

    May 3, 2019 at 1:32 am

    Thank you Walter, that is quite nice!

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