Copy link to clipboard
Copied
Hi, I'm having trouble changing the colour of a light layer in a logo reveal template.
When I change the colour from red to green it keeps defaulting to red.
I think it is to do with the expression which is comp("Main").layer("ColorControl").effect("Light")("Color").
I've tried various commands such as comp("Main").layer("ColorControl").effect("Light")("Color")("fillColor#7B8E31") and "ColorControl#7B8E31") but keep getting error warnings.
Could someone help? Thanks very much!
Copy link to clipboard
Copied
Since you've got the Hex Code, use the hexToRGB Expression Function -
hexToRgb("#7B8E31")
Copy link to clipboard
Copied
Use the `hexToRgb` function like this: `comp("Main").layer("ColorControl").effect("Light")("Color").setValue(hexToRgb("#7B8E31"))`.
Copy link to clipboard
Copied
Tried this but still getting an error unfortunately.
full script looked liked this: comp("Main").layer("ColorControl").effect("Light")("Color").setValue(hexToRgb("#7B8E31")
also tried with the 2 brackets.
Copy link to clipboard
Copied
thanks- unfortunately still getting error. tried comp("Main").layer("ColorControl").effect("Light")("Color")hexToRgb("#7B8E31") any thoughts?
Copy link to clipboard
Copied
Hi, I'm having trouble changing the colour of a light layer in a logo reveal template.
When I change the colour from red to green it keeps defaulting to red.
I think it is to do with the expression which is comp("Main").layer("ColorControl").effect("Light")("Color").
I've tried various commands such as comp("Main").layer("ColorControl").effect("Light")("Color")("fillColor#7B8E31") and "ColorControl#7B8E31") but keep getting error warnings.
Could someone help? Thanks very much!
Copy link to clipboard
Copied
Ensure you are using the correct syntax by setting the color property directly, like this: `comp("Main").layer("ColorControl").effect("Light")("Color").setValue([0.482, 0.557, 0.192])` for a green color.
Copy link to clipboard
Copied
thanks- tried this but unfortunately still getting an error- see attached
Copy link to clipboard
Copied
Copy link to clipboard
Copied
thanks very mcuh - tried this but since been told that apparently it had to be altred on another layer and not in the same expression,