Skip to main content
Inspiring
May 22, 2025
Answered

getColorValue() throws error instead of returning 0 and setValue() on color parameters sets to black

  • May 22, 2025
  • 2 replies
  • 187 views

I'm iterating through the properties of a component in Premiere Pro using ExtendScript. In order to detect whether a property is a color value, I'm calling getColorValue() as suggested in the documentation.

According to the documentation, this method is supposed to return 0 if the property is not a color. However, in practice, it throws an "Unknown error" exception when used on non-color properties.

This makes it difficult to safely check if a property holds a color value, and it contradicts the behavior described in the documentation.


I can successfully get the value of a color property using getValue(), which returns a numeric value. However, when I try to reuse that same value in setValue(value, 1) on a color parameter, the color always becomes black — regardless of the original value.

It seems like getValue() on a color parameter gives back some encoded internal number, but setting it via setValue() doesn’t restore the original color correctly.

Has anyone found a reliable way to:

  1. Read a color value using getValue() (not getColorValue())

  2. Reapply that same color to another property using setValue()

Or is the only option to use getColorValue() and setColorValue() instead?

Correct answer Bruce Bullis

>setValue(value, 1)

setValue() has more params than that: there is example usage in PProPanel.

Can you provide a PPro project (presumably, with some effect with a color param applied to some trackItem), and some ExtendScript, that reproduce the problem you're seeing?

[I DM'd you my adobe.com address]

2 replies

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
July 17, 2025

>setValue(value, 1)

setValue() has more params than that: there is example usage in PProPanel.

Can you provide a PPro project (presumably, with some effect with a color param applied to some trackItem), and some ExtendScript, that reproduce the problem you're seeing?

[I DM'd you my adobe.com address]

Kevin J. Monahan Jr.
Community Manager
Community Manager
July 17, 2025

Hi,

Thanks for the message. I changed the tag of this post to "SDK." With this newer tag, it should call the proper developer or community expert to the post. I hope we can help you shortly. Sorry for the frustration.

 

Thanks,
Kevin

 

Kevin Monahan - Sr. Community and Engagement Strategist – Adobe Pro Video and Audio