Change Colour of Panel (Script or OSC)

(had a look and can’t see this as a current capability)

How about the ability to change the colour of a Panel widget either in response to GP Script or to an OSC message?

As this widget is one that can be any colour it might be useful to use as a large indicator for some thing happening - e.g. setting it red when an instrument is bypassed, or based on the playing status of the transport.

I think it would be cool anyway!

Just create 2 Panel widgets, for example 1 red and 1 green.
Same size, same position and then in scripting something like this:

function Metro (v_beat : integer)
 if v_beat == 1 then
    SetWidgetValue(PANEL,0)
    SetWidgetValue(PANEL2,1.0)
 elsif v_beat == 2 then
    SetWidgetValue(PANEL,1)
    SetWidgetValue(PANEL2,0.0)
 elsif v_beat == 3 then
    SetWidgetValue(PANEL,0)
    SetWidgetValue(PANEL2,1.0)
 elsif v_beat == 4 then
    SetWidgetValue(PANEL,1)
    SetWidgetValue(PANEL2,0.0)
 end
end           
On BeatChanged(Bar : Integer, Beat : Integer, Subbeat : Integer)
var v_pointer : string

 if Beat == 0 then
    v_beat = 0
    v_bar  = 1
 end   
 
 v_beat := v_beat+1;
 if v_beat == 5
  then v_bar = v_bar+1;
       v_beat = 1;
 end;      
 
 v_pointer = IntToString(v_bar)+"."+IntToString(v_beat)
 SetWidgetLabel(beat, v_pointer)
 Metro(v_beat)
end
...

Oh yes, what a good shout on using the transparency to do this! Great, that will get me what I need for now, but I would still say a native colour change via script/OSC could be a great addition.

Thanks pianopaul as always!

I knew we already had a similar discussion at a time: https://community.gigperformer.com/t/new-panel-widget/2052

Indeed it would be much better if we could act on the RGBA channels of the panel background color. But it would make from the color panel the first widget with 4 different values, such that SetWidgetValue is not enough anymore :grimacing:

You are right, maybe we get such a feature in the next updates.

Yes, who knows :wink: