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
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.
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!
On/Off checkbox control is smart, but this smarter.
Expressions are so powerful - thanks for sharing your knowledge as always, Sergei!
yes
Thanks for your kind words, CJ! Couldn't agree more, expressions are incredibly powerful!
man, you are the master
Very clever, thanks for sharing.
Simply amazing Sergei. Thank you very much for sharing❤
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.
☺
Very smart! Thanks for sharing
Thanks for your kind words!
Great expression. does it work with grey shades also?
Thanks for the kind words! Absolutely, this expression works great with grey shades too.
This is very useful.. Thank you!
Awesome! I'm really glad you found this tutorial helpful. Thanks a bunch for tuning in!
Awesome! Thank you
Thanks!
just banger!
SImple but Genious
As they say, 'The simplest solution is often the best.'
But wait, how do you have a color of the text object?
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!
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!
@@ukramedia Great! Thank you very much!
@@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.
@@thinklearndesign7441 I just sent you an email. Let me know if you didn't get it. Thanks!