快速登录:  

Forum: VirtualDJ Skins

话题: [VDJScript] Define Contrasting Text Color to cue_color...
Hi! I'm working on a skin (picture attached). The cluster of (8x) colored rectangular fields are Cue Points with time labels displayed. The colors are being auto-chosen by VDJ (so there's no guarantee I'll know what they are beforehand, and I don't want to hardcode these colors).

As you can see from the picture, the Cue Point time labels are currently hardcoded to always be white. I'm looking for a snippet of code I can put in the Cue Point time label <textzone> that will make that text either Black or White depending on the color. Expected result would be that the Green, Cyan, and Yellow Cue Points would have Black text, and the rest would retain White text. Following is code from my Skin, along with the place that I'm imagining the "magic expression" would go:


<textzone visibility="has_cue 1">
<pos x="+8" y="+0"/>
<size width="64" height="24"/>
<text fontsize="12" color="[HERE IS WHERE I AM SEEKING AN EXPRESSION THAT EVALUATES cue_color 1 AND SETS THE TEXT COLOR TO EITHER BLACK OR WHITE BASED ON IT]" align="left" format="`cue_pos 1 min`:`cue_pos 1 sec & param_cast '00'`.`cue_pos 1 msec & param_multiply 0.1 & param_cast 'int_trunc' & param_cast '00'`"/>
</textzone>


 

发表时间 Fri 22 Jul 22 @ 11:59 pm
SOLVED. I designed my way around it instead:

 

发表时间 Sat 23 Jul 22 @ 2:50 pm