• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Expression error

New Here ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

16847678813816277272728975948351.jpg

 I just want to create expression for variables and it's typed this arrow and I cannot find a solution for it and the variable is correct what is the problem with it.

It's type the expression result dimension for 4 , not one

TOPICS
Error or problem

Views

136

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

LATEST

Color values are always four values that run from 0 to 1. [0, 0, 0, 1] is black with no transparency if the color value supports transparency. [1, 1, 1, .5] would be white with 50% opacity if the property supports transparency. Almost all Color Properties do not support transparency, but you still need the Alpha value in the array, so there are always 4 values in the property; the last one is almost always set to 1.

 

There are options in the Expression Controls/Color Conversion menu to convert HEX, RGB, or HSL values to the 0 to 1 values required for any Color Control. Sometimes using one of those options is more efficient.

 

If you want to control the RGB values will need three sliders to have full control over the Color. If you are trying to use a slider directly, it is almost always a good idea to divide the Slider value by 100.

 

This will work if you create three sliders and name them Red, Green, and Blue:

 

r = thisComp.layer("h2").effect("Red")("Slider")/100;
g = thisComp.layer("h2").effect("Green")("Slider")/100;
b = thisComp.layer("h2").effect("Blue")("Slider")/100;
[r, g, b, 1]

 

If you tell us exactly what you are trying to do, we can probably come up with a more efficient solution. I typically use a series of color values and an Expression Controls/Menu Control to change colors so I can easily stick to the Production Design Guide Specifications supplied by a client.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines