Page 1 of 1

Default status screen colours

Posted: Sat Dec 28, 2024 12:19 pm
by G3GJA
Tim

Is it possible to globally change the colours of the status screens?

The black on red has a low contrast range because the luminance component varies between 0% and 30%.

On GB3EY I'd like to be able to change them to yellow text on a blue background. That would give luminance values of 89% and 11%, a range of 78% which is more than double the contrast.

I have tried myself, but only succeeded in making a mess of it!

73

Clive G3GJA

Re: Default status screen colours

Posted: Sun Dec 29, 2024 10:31 am
by g8lce
See

viewtopic.php?t=7024

and a PDF of the info:
Editing Ryde Screen.pdf
(145.72 KiB) Downloaded 144 times
Martin G8LCE

Re: Default status screen colours

Posted: Sun Dec 29, 2024 11:16 am
by G3GJA
Thanks for the reference Martin.

I've got as far as changing the background successfully, but it's the text colour I was having difficulty with.

Did you ever manage to change it from black? I changed the status screen text but it messed up the station ID that pops up briefly (with the blue borders and white background).

Clive

Re: Default status screen colours

Posted: Sun Dec 29, 2024 3:22 pm
by MW0RUD
Hi Clive

Have a look in rydeplayer/states/playback.py

The line below is the one where the text is rendered and pulls the colour out of the theme.

Code: Select all

lineSurface=self.theme.fonts.playStateTitle.render(line, True, self.theme.colours.black)
Tim

Re: Default status screen colours

Posted: Sun Dec 29, 2024 4:33 pm
by G3GJA
Hi Tim

Do I need to define the colour yellow first? Perhaps in the player.py section:

Code: Select all

# container for the theme
class Theme(object):
    def __init__(self, displaySize, ftfont=False):
        self.colours = type('colours', (object,), {
            'transparent': (0,0,0,0),
            'transpBack': (0,0,0,51),
            'black': (0,0,0,255),
            'white': (255,255,255,255),
            'red': (255,0,0,255),
            'textError': (255,0,0,255),
            'menuBlackInactive': (0,0,0,127),
            'backgroundMenu': (57,169,251,255),
            'backgroundSubMenu': (57,169,251,255),
            'backgroundPlayState': (0,0,255,255),
Thanks

Clive

Re: Default status screen colours

Posted: Sun Dec 29, 2024 4:56 pm
by G3GJA
Thanks for putting me on the right track, Tim.

I've answered my query about defining the colour in player.py by modifying it and now I've yellow text on a blue background.

73

Clive G3GJA