Automatic Text Color Adjustment in After Effects

Поділитися
Вставка
  • Опубліковано 6 вер 2024
  • DESCRIPTION:
    Tired of manually adjusting text color for Motion Graphics Templates (MoGrts)? This After Effects expressions tutorial is your game-changer!
    Learn how to create dynamic text that automatically adjusts its color based on the background. Simply pick your desired background color, and the text will intelligently switch between black and white for optimal contrast.
    Here's what you'll learn:
    - The power of expressions in After Effects
    - Building an expression to adjust text color based on brightness
    - Fine-tuning the expression for perfect results
    This tutorial is perfect for:
    - Motion Designers (especially MoGrt creators)
    - Anyone who wants to create dynamic and responsive text animations
    Make your MoGrts truly versatile with this easy-to-follow tutorial!
    ADOBE STOCK:
    stock.adobe.co...
    BRIGHTNESS FORMULA:
    Math.sqrt(0.299 * inputColor[0]**2 + 0.587 * inputColor[1]**2 + 0.114 * inputColor[2]**2)
    #mogrt #aftereffects #motiongraphics

КОМЕНТАРІ • 27

  • @ilirbeqiri
    @ilirbeqiri 5 місяців тому +10

    Long time no see, Sergei. Great idea switching colors based on the lightness of the reference layer! The code is a bit long though. A single line would have been enough:
    rgbToHsl("your sampled color")[2] > 0.5 ? [0,0,0,0] : [1,1,1,1];
    You first sample the reference color, convert it from RGB to HSL (hue, saturation, lightness), get the lightness component [2] and compare it against 0.5. If it's greater, return a black color [0,0,0,0] else return white [1,1,1,1]. Don't get me wrong, I'm a great fan, just wanted to show a bit of a shorter way to get the same result. This takes nothing away from your idea. Keep them coming. 👏👏👏And it's great to see you bringing Blender into the mix. It's a great tool and has much to offer to the motion graphics world.

    • @ukramedia
      @ukramedia  5 місяців тому +3

      Wow! 👏👏👏 Seriously, you're a legend for coming up with this solution. How did I not think of this?!?! It's just so brilliantly simple! Good job on that! I definitely went a bit overboard with my approach there, didn't I? Thanks a ton for sharing this gem with us!

  • @motashaiye
    @motashaiye 5 місяців тому +4

    On/Off checkbox control is smart, but this smarter.

  • @CjVeloso
    @CjVeloso 5 місяців тому +3

    Expressions are so powerful - thanks for sharing your knowledge as always, Sergei!

    • @alexflame9383
      @alexflame9383 5 місяців тому +2

      yes

    • @ukramedia
      @ukramedia  5 місяців тому +2

      Thanks for your kind words, CJ! Couldn't agree more, expressions are incredibly powerful!

  • @gcbraga
    @gcbraga 3 місяці тому +1

    man, you are the master

  • @5435234
    @5435234 5 місяців тому +2

    Very clever, thanks for sharing.

  • @CatalinGulan
    @CatalinGulan 5 місяців тому +1

    Simply amazing Sergei. Thank you very much for sharing❤

  • @michaelohare390
    @michaelohare390 5 місяців тому

    Thanks Sergi,
    I noticed that the Fill effects that are applied to the Text layer have big role to play in this. Both the Dark Color (fx) and the Light Color (fx) need to be off. It would not work for me otherwise.

  • @jmricks
    @jmricks 5 місяців тому +1

    Very smart! Thanks for sharing

    • @ukramedia
      @ukramedia  5 місяців тому +1

      Thanks for your kind words!

  • @shyammediaworks7110
    @shyammediaworks7110 5 місяців тому +1

    Great expression. does it work with grey shades also?

    • @ukramedia
      @ukramedia  5 місяців тому +1

      Thanks for the kind words! Absolutely, this expression works great with grey shades too.

  • @pubgmobilestreams937
    @pubgmobilestreams937 5 місяців тому +1

    This is very useful.. Thank you!

    • @ukramedia
      @ukramedia  5 місяців тому

      Awesome! I'm really glad you found this tutorial helpful. Thanks a bunch for tuning in!

  • @ManexFX
    @ManexFX 5 місяців тому +1

    Awesome! Thank you

  • @vasily3994
    @vasily3994 5 місяців тому +1

    just banger!

  • @DinuGranaci
    @DinuGranaci 5 місяців тому +1

    SImple but Genious

    • @ukramedia
      @ukramedia  5 місяців тому

      As they say, 'The simplest solution is often the best.'

  • @CLWill
    @CLWill 4 місяці тому

    But wait, how do you have a color of the text object?

  • @thinklearndesign7441
    @thinklearndesign7441 Місяць тому +1

    Did UKRAMEDIA go out of business? I bought some of their lifetime products a while ago that I cannot access anymore through their download page and cannot get a response through their support email. Unless four days plus is the normal response time. Should I wait a week or a month for them to contact me? If that is the case, they need to hire a support team to answer their customer's requests. Also, I see there hasn't been a video made for this youtube channel in about four months. Can someone help me out? Thanks!

    • @ukramedia
      @ukramedia  Місяць тому

      Sorry for the trouble. Your email got lost in the spam shuffle, but I’ve fixed the issue, and you should now have access to all my tools. Again, I apologize for the inconvenience. Thanks for using my tools!

    • @thinklearndesign7441
      @thinklearndesign7441 Місяць тому

      @@ukramedia Great! Thank you very much!

    • @thinklearndesign7441
      @thinklearndesign7441 Місяць тому

      @@ukramedia Hello again, in case there is a spam situation, can I ask you a question here? The issue is that I ran out of room on my C drive for after effects and had to place it in my D drive. Do I still put the JSXBin file in Scripts UI Panel in the C drive for that or does it somehow need to be placed in the D drive somewhere? There is no "Programs" folder in the D drive for me to do that.
      Thanks.

    • @ukramedia
      @ukramedia  Місяць тому +1

      @@thinklearndesign7441 I just sent you an email. Let me know if you didn't get it. Thanks!