Active App Colour

Hello. I would like my interface to have one color, for example blue, if a program window is active and a different color if another program window is active. Is there such a possibility in JUCE? I’ve tried every possible option but haven’t found anything.

Hi, I’m not quite sure what the exact problem is from what you’re writing.
But if the problem is knowing what window is active, then I’d recommend checking out this function: JUCE: TopLevelWindow Class Reference

But maybe the problem is actually changing the colour of your interface?

Thank you.
I don’t know if it’s possible to do this, but it works:

void GUI::AudioPlayer::timerCallback()
{
    if (Process::isForegroundProcess()) 
    {
        if (!isAlwaysOnTop()) 
        {
            setAlwaysOnTop(true);
            //setVisible(true);
            col = 1;
        }
        repaint();
    } 
    else 
    {
        if (isAlwaysOnTop()) 
        {
            setAlwaysOnTop(false);
            //setVisible(false);
            col = 0;
        }
        repaint();
    }

void GUI::AudioPlayer::paint (Graphics& g)
{
    if (col == 1)
        {
        int x = proportionOfWidth (0.5000f) - (proportionOfWidth (1.0000f) / 2), y = 0, width = proportionOfWidth (1.0000f), height = proportionOfHeight (1.0000f);
        Colour fillColour1 = Colour (0xff0d05a4), fillColour2 = Colour (0xff14006a);
        g.setGradientFill (ColourGradient (fillColour1,
                                             104.0f - 0.0f + x,
                                             50.0f - 0.0f + y,
                                             fillColour2,
                                             104.0f - 0.0f + x,
                                             550.0f - 0.0f + y,
                                             false));
        g.fillRect (x, y, width, height);
    }
    else
        g.fillAll (Colour (0xffc6c6c6));
}