Sony Pixel Power calrec Sony

Random Fixed Color Expression

25/06/2022

Random Fixed Color Expression

Andy Ford June 28, 2022

0 Comments

This tutorial expands upon my previous tutorial on creating a random color expression. That expression randomly changed color of your shape layer, but you achieved values that were in between the range of colors you selected. This tutorial features expressions to help you randomly change between fixed colors and not get the in-between values.

Some contents or functionalities here are not available due to your cookie preferences!

This happens because the functionality/content marked as Google Youtube uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

First, we add color controls to our shape layer for each color that we want to appear. Then, we set an expression for our shape's fill color and create variables for each and add those variables to an array. We can control the value of the array by adding a slider control, and then return the value of the array (which is determined by the slider).

Once you add Math.floor to your slider value to eliminate complexities when your slider value is not a whole number, you can control the color shown based on your slider value.

var color1 = effect( Color Control 1 )( Color );

var color2 = effect( Color Control 2 )( Color );

var color3 = effect( Color Control 3 )( Color );

var color4 = effect( Color Control 4 )( Color );

var color5 = effect( Color Control 5 )( Color );

colors=[color1,color2,color3,color4,color5];

slider=Math.floor(effect( Slider Control )( Slider ));

colors[slider];

To automate this, we need to do more. We must make a variable that makes this whole expression go. For this, we create a variable that is equal to Math.floor(time/slider). This creates a whole number value that is always changing and makes your slider value act as a throttle or speed control.

This expression needs to work in conjunction with seedRandom. The seedRandom method allows you to replay the same random movements every time. The seed value is the variable we just created above, and then we need to complete the seedRandom method with a timeless argument that is either true or false. In this case, we want to use true because that makes this timeless. By that, I mean it stays the same on each frame but still chooses a random value. If you select false, everything changes each frame, which is not what is needed in this instance.

Now we need another value that helps choose the color. Set this to Math.floor(random(colors.length)). This adds the randomness into the equation, and sets the confines of the randomness to the number of values in your array. Finally, we return the value of the colors, which in the variable just created.

var color1 = effect( Color Control 1 )( Color );

var color2 = effect( Color Control 2 )( Color );

var color3 = effect( Color Control 3 )( Color );

var color4 = effect( Color Control 4 )( Color );

var color5 = effect( Color Control 5 )( Color );

colors=[color1,color2,color3,color4,color5];

slider=effect( Slider Control )( Slider );

engine=Math.floor(time/slider);

seedRandom(engine,true);

colorChoose=Math.floor(random(colors.length));

colors[colorChoose];

Speed of color change is regulated by the slider control value.

###

Enjoying this tutorial? Sign up now for the Creative COW Newsletter!

Sign up for the Creative COW newsletter and get weekly updates on industry news, forum highlights, inspirational tutorials, tips, burning questions, and more! Receive bulletins from the largest, longest-running community dedicated to supporting professionals working in film, video, and audio.

Enter your email address, a first and last name, and let us know what you'd like to see more of in the message!

.grecaptcha-badge{visibility:hidden}.meow-contact-form .meow-contact-form__header{display:flex;margin-bottom:10px}.meow-contact-form .meow-contact-form__header .meow-contact-form__header__content{flex:1;display:flex;flex-direction:column;justify-content:center}.meow-contact-form .meow-contact-form__header .meow-contact-form__header--image--left{margin-right:10px}.meow-contact-form .meow-contact-form__header .meow-contact-form__header--image--right{margin-left:10px}.meow-contact-form--editor input{color:gray}.meow-contact-form--default{font-size:18px}.meow-contact-form--default input:not([type=submit]),.meow-contact-form--default textarea{width:100%}.meow-contact-form--default input[type=submit]{padding:10px 40px;font-size:18px;line-height:18px}.meow-contact-form--default .meow-contact-form__info{margin-top:-10px;margin-bottom:10px;font-size:14px}.meow-contact-form--default .meow-contact-form-message{font-style:italic}.meow-contact-form--default .meow-contact-form__group{margin-bottom:15px;font-size:16px}.meow-contact-form--default .meow-contact-form__group .meow-contact-form__group-input,.meow-contact-form--default .meow-contact-form__group .meow-contact-form__group-textarea{margin-top:3px;padding:5px;font-size:14px}.meow-contact-form--default .meow-contact-form__header{margin-bottom:15px}.meow-contact-form--default .meow-contact-form__header__content--title{font-size:24px;line-height:24px}.meow-contact-form--default .meow-contact-form__header__content--text{margin-top:5px;font-size:16px;line-height:16px;color:gray}.meow-contact-form--default .meow-contact-form__group-button{padding:10px 20px;border:none;margin-top:10px;cursor:pointer}.meow-contact-form--default .meow-contact-form__group-button:hover{filter:brightness(1.05)}.meow-contact-form--meowapps{padding:20px;box-shadow:0 0 5px #d8d8d8;font-size:18px;background:#fff;color:#333}.meow-contact-form--meowapps input:not([type=submit]),.meow-contact-form--meowapps textarea{width:100%;border:#e7e7e7 solid 1px}.meow-contact-form--meowapps .meow-contact-form__info{margin-top:-10px;mar
LINK: https://creativecow.net/random-fixed-color-expression/...
See more stories from creativecow

Most recent headlines

09/12/2024

Dalet Named an IDC Innovator in Media and Entertainment

Dalet, a leading technology and service provider for media-rich organizations, today announced that it has been named an IDC Innovator in the IDC Innovators: ...

30/11/2024

Amino Fuels Next Frontier for Low Latency Enterprise Vide...

Amino, a leading provider of enterprise video and digital signage solutions, today announces the deployment of its Amino H200 4K media player and Orchestrate re...

30/11/2024

Blackmagic Design Announces Blackmagic Cloud Price Reduction

Blackmagic Design Announces Blackmagic Cloud Price Reduction Brie Clayton November 29, 2024 0 Comments New lower price for Blackmagic Cloud media stor...

30/11/2024

Massive Black Friday savings from Native Instruments, iZotope, and Plugin Alliance starts now

Massive Black Friday savings from Native Instruments, iZotope, and Plugin Allian...

30/11/2024

Recreating Star Trek's Briar Patch with Motion Control

Recreating Star Trek's Briar Patch with Motion Control Graham Quince November 29, 2024 0 Comments This is a collaboration with @nmphoto37 who ha...

30/11/2024

Donations open for the RT Toy Show Appeal 2024

Helping to change children's lives for good: Donations open for the RT Toy Show Appeal 2024 For the last four years, the people of Ireland have donated i...

29/11/2024

How Are Media Trends Evolving in a World Demanding Financial Responsibility?

In todays media landscape, ensuring that content complies with regulatory standards and cultural sensitivity is critical. Compliance editing is an important com...

29/11/2024

Culture Secretary sets out plan for BBC financial sustainability

The government said it intends to use a review of the corporations Royal Charter to consider funding options to support its long-term future By Matthew Corriga...

29/11/2024

Liverpool pilots plug and play' facilities for broadcasters and film crews

The city is collaborating with Ecotricity X Grid Faeries to explore the installation of power pillars By Jenny Priestley Published: November 29, 2024 The ...

29/11/2024

EditShare powers cross-site collaboration for Swedish post house Tint

EditShare solutions enable secure, streamlined workflows between the Swedish post production houses sites By Matthew Corrigan Published: November 29, 2024 ...

29/11/2024

Zattoo welcomes Paul Fournier as new VP of strategy and projects

He will take over management of the IT team at Zattoo, which includes infrastructure and administration divisions By Matthew Corrigan Published: November 29,...

29/11/2024

Karen Clark appointed CEO at Telstra Broadcast Services

Her remit includes advancing TBSs global agenda and launching market-ready 5G media solutions By Matthew Corrigan Published: November 29, 2024 Her remit i...

29/11/2024

RT SHORT STORY COMPETITION 2024 WINNERS ANNOUNCED

RT SHORT STORY COMPETITION 2024 WINNERS ANNOUNCED FIRST PRIZE ( 5,000) AWARDED to MATTIE BRENNAN for DEAD BAIT' SECOND PRIZE ( 4,000) to STEPHEN O'R...

29/11/2024

Ross Video Wins Best Innovation Award at 2024 Best Ottawa Business Awards

Recognition for Artimo: The Revolutionary Robotics Solution Redefining Broadcast Technology Ottawa, Canada - November 29, 2024 - Ross Video, a global leader in ...

29/11/2024

VEON Welcomes Unfreezing of its Corporate Rights in Kyivstar, Supporting Ukraine's Recovery and Resilience

29 Nov 2024 VEON Welcomes Unfreezing of its Corporate Rights in Kyivstar, Suppo...

29/11/2024

The Art and Science: Behind the Scenes of LEO's Hyena VFX

In our latest interview, Mangesh Awate, CG Supervisor at MPC India takes us behind the scenes of the stunning hyena sequences in LEO, revealing the cutting-edge...

29/11/2024

Monthly Rewind: Mufasa: The Lion King, Lilo & Stitch, The Game Awards, Festive Favourites, and more

The holiday season is upon us and we've got a whole lot to celebrate! MPC ar...

29/11/2024

Sky announce new three-part golden age of darts docuseries Dart Kings

Sky announce new three-part golden age of darts docuseries Dart Kings Produced by award-winning Mindhouse Productions Friday 29 November 2024 In the New Year,...

29/11/2024

Baselight in the cloud on display in London

Thank you to everyone who joined us recently for our product event in our new look London HQ. Alongside the presentations on Baselight 7 and Nara, we provided ...

29/11/2024

2024-11-29

This holiday season, Wallace & Gromit have decorated London's Battersea Power Station, home to Apple's U.K. headquarters....

28/11/2024

Give Me the Backstory: Get to Know 3 Indigenous Filmmakers With Shorts at the 2024 Sundance Film Festival

A still from Vea Mafile'o's Lea Tupu'anga / Mother Tongue, which s...

28/11/2024

BBC expands cloud migration with SAP on AWS

Further migration to cloud will enable the corporation to streamline processes and workflows, allowing it to focus on improving audience engagement By Matthew ...

28/11/2024

Interra Systems Adds Netflixs VMAF Scoring to VEGA Media...

Interra Systems, a leading provider of end-to-end quality assurance solutions for the digital media industry, today announced the integration of Netflix s Video...

28/11/2024

PSI Broadcasting stays ahead of the game by advancing wit...

South East Asia's leading broadcaster and playout service provider, PSI Broadcasting, extends its facilities with the purchase of PlayBox Neo's MultiPla...

28/11/2024

Lifted Entertainment Expands Use of Hitomi MatchBox for M...

Hitomi Broadcast, the market leader in audio/video alignment and latency tools, announces that Lifted Entertainment, one of the world s leading creators and pro...

28/11/2024

Tint Boosts Collaborative Workflows with EditShare Storag...

One of the leading Scandinavian post-production houses, Tint, has supercharged its media workflows with EditShare's high-performance storage across its Goth...

28/11/2024

Last Cut Media Increases EditShare Footprint to Streamlin...

EditShare, the technology leader that enables storytellers to create and manage collaborative workflows at every stage from storyboard to screen, has expanded i...

28/11/2024

CVP Announces Black Friday Promotions

CVP, one of Europe's leading resellers and providers of professional video and broadcast solutions, has unveiled its Black Friday deals for 2024, with some ...

28/11/2024

White Peaks Solutions Taps NPAW To Enhance Its KWIKmotion OTT Platform

BARCELONA and PARIS White Peaks Solutions (WPS), the end-to-end over-the-top solutions provider based in France, has selected NPAW's video-analytics solutio...

28/11/2024

Interra Systems Adds Netflix's VMAF Scoring to VEGA Media Analyzer

CUPERTINO, Calif. Interra Systems has integrated Netflixs Video Multi-Method Assessment Fusion (VMAF) algorithm a widely-trusted standard for video quality asse...

28/11/2024

Survey: Consumers Prioritize Spending on Streaming Over Retirement Savings

MUNCIE, Ind. Despite all the complaints about the rising cost of streaming services, a new survey from First Merchants Bank indicates that setting aside money f...

28/11/2024

LYNX Technik Appoints Vincent Noyer as Director of Product Marketing

LYNX Technik Appoints Vincent Noyer as Director of Product Marketing Brie Clayton November 27, 2024 0 Comments Will Guide Innovation and Drive Market ...

28/11/2024

Unlocking Creative Potential: How Filmmakers and Videographers Can Leverage Adobe Express

Unlocking Creative Potential: How Filmmakers and Videographers Can Leverage Adob...

28/11/2024

Black Friday Deals from LumaTouch

Black Friday Deals from LumaTouch Brie Clayton November 27, 2024 0 Comments LumaTouch Significantly Expands Feature Set Offerings of its Storyblocks ...

28/11/2024

Chinese-Language Period Drama Perfect Match' to Launch Exclusively and Globally on Netflix

Back to All News Chinese-Language Period Drama Perfect Match' to Launch Ex...

28/11/2024

Watch the Spectacular and Intense Trailer for Norwegian Disaster Series 'La Palma'

Back to All News Watch the Spectacular and Intense Trailer for Norwegian Disast...

28/11/2024

Arvato Systems celebrates successful completion of the "GAIA-X 4 ROMS" research project

Arvato Systems Celebrates Successful Completion of the Gaia-X 4 Roms Research ...

28/11/2024

RT announces unrivalled General Election 2024 Results coverage across all platforms

Joint Exit Poll results revealed live on Friday night 43 individual real-time...

28/11/2024

Tommy Tiernan, Tommy Bowe and Ollie and Roseanna Ruane on this Friday's Late Late Show

Here is your host, Patrick Kielty! Following his incredibly successful North Am...

28/11/2024

Get the Power of GeForce-Powered Gaming in the Cloud Half Off With Black Friday Deal

Turn Black Friday into Green Thursday with a new deal on GeForce NOW Ultimate an...

27/11/2024

Give Me the Backstory: Get to Know Astrid Rondero and Fernanda Valadez, the Co-Directors of Sujo

By Jessica Herndon One of the most exciting things about the Sundance Film Fest...

27/11/2024

Dinner and a Movie: Katie Arthurs on Top End Wedding and Breakfast Burritos

The author watching a film with her mother and brother....

27/11/2024

Inside the Archives: Showcasing Sundance Talent in Oz and the Colosseum

Denzel Washington at the Piper-Heidsieck Tribute press conference at the 1993 Sundance Film Festival. Photo by Sandria Miller...

27/11/2024

Spotify Teams Up With UK Charity Youth Music To Support Grassroots Youth Spaces

Over the past decade in the U.K., financial constraints and shifting community resources have put many grassroots music spaces under increasing pressure. There ...

27/11/2024

Are You Wrapped-Ready? First Make Sure Your Spotify App Is Up-to-Date

Wrapped is almost here and Spotify is starting to drop hints at what this year's campaign is all about: the fans. To get ready for the big reveal, Spotify i...

27/11/2024

Find Restaurant Recommendations Based on Your Music Taste With Spotify, American Express, and Resy

Dining out for the vibes? You're not alone. According to Resy's 2024 Ret...

27/11/2024

L3Harris' Lou Speaight is a Finalist at Women in Defence UK Awards 2024

The Women in Defence U.K. awards ceremony celebrates the extraordinary contributions individuals and teams make to Defence....

27/11/2024

Tint Boosts Collaborative Workflows with EditShare Storage Across Gothenburg and Stockholm Facilities

Tint Boosts Collaborative Workflows with EditShare Storage Across Gothenburg and...

27/11/2024

Clear-Com Powers Communication at the 2024 Singapore Airlines Formula 1 Singapore...

eds3_5_jq(document).ready(function($) { $(#eds_sliderM519).chameleonSlider_2_1({...

27/11/2024

Nielsen launches activation with Advanced Audiences, enhancing digital campaign precision, reach and effectiveness across New Zealand

Auckland, November 26, 2024 Nielsen today announced the launch of Advanced Aud...