Skip to main content
Participating Frequently
September 27, 2021
Answered

Using XML to create a custom label color

  • September 27, 2021
  • 1 reply
  • 1581 views

Hi,

 

I'm wanting to use a custom label color for a few clips that will be repeating throughout my sequence.

 

Right now I have this within each clipItem, which works:
<labels>
<label2>Forest</label2>
</labels>
 
But could I do something like this?
<labels>
<label2>New Purple</label2>
<color>#a033f3</color>
</labels>
 
Or anything similar? 
This topic has been closed for replies.
Correct answer bbb_999

Mangling XML files to specify label colors is unsupported, and not recommended.

PPro's ExtendScript API contains the getColorLabel() / setColorLabel() calls I referenced; here's some example code.

1 reply

bbb_999
Community Manager
Community Manager
September 27, 2021

I'm not sure what a clipItem is; do you mean projectItem, or trackItem? 

For projectItems, you can use getColorLabel() / setColorLabel(). Note: trackItems created from a projectItem will not have their label color updated; any new trackItems created from those projectItems, will get the updated label.

Also...what, specifically, are you editing, the .prproj file?

Participating Frequently
September 27, 2021

I'm editing an XML file that I import to Premiere.

 

And by clip item I mean the item that gets displayed in the timeline:

 

<sequence>
<media>
<video>
<track>
<clipitem id="clipitem-100001">
						<name>Movie 1</name>
						<start>0</start>
						<end>30</end>

						<masterclipid>masterclip-100000</masterclipid>
						<enabled>TRUE</enabled>
						<rate>
							<timebase>30</timebase>
						</rate>
						<file id="file-100003">
							<name>Movie 1.mp4</name>
							<pathurl>./PNGs/Movie_1.mp4</pathurl>						
						</file>
						<labels>
							<label2>Rose</label2>
							(Where would this go? setColorLabel(#00FFFF))
						</labels>
					</clipitem>

 

 

bbb_999
Community Manager
bbb_999Community ManagerCorrect answer
Community Manager
September 27, 2021

Mangling XML files to specify label colors is unsupported, and not recommended.

PPro's ExtendScript API contains the getColorLabel() / setColorLabel() calls I referenced; here's some example code.