Change UI / Window Colors

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
LeoGrun
Engineer
Engineer
Posts: 1
Joined: 24 Aug 2021 04:22

Change UI / Window Colors

Post by LeoGrun »

I was wondering if there is some way (through modding, GFX packs or otherwise) to change the window colors.

The reason I want to do this is so I can increase compatibility on single color displays with the hope being I can get the changes into the andorid version to play on an ereader. This is partly an 'academic' project to see if I can-- searching makes it look like this hasn't been done yet, or I'm just guessing the wrong keywords. However, I also think this may help increase accessibility for people with backlight issues. Contemporary ereaders (that don't suck) even have modes that support full motion video, and the game is running very well and is 'playable', but the ui could be a lot better if it were possible to make the backgrounds lighter or even possibly just white.

I'm willing to take this on myself, if it is at all possible. Some sources say you cannot change the UI element colors, but the stuff I found was also very old so I'm not sure what the current state of things is.
Auge
Director
Director
Posts: 633
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Change UI / Window Colors

Post by Auge »

Hello

It is possible to define alternative UI-colors on the detour to alter the company colours. So it is more or less a hack. There is only one set you can use to learn how the company colours influence the UI (the NewCC Set).

On a grey-scale-display I would expect working with shades and patterns and not with colours that could end in a undistinguishable colour mash. But with the knowledge that this is an 'academic' project, I (in your place) would give it a try.

Tschö, Auge
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 495
Joined: 11 Aug 2019 18:15
Contact:

Re: Change UI / Window Colors

Post by 2TallTyler »

GUI colors are hard-coded into the game, but that could be changed by forking the source code, making your changes, and compiling it yourself. Here's a recent Pull Request which shows how those colors are changed, and illustrates the can of worms you're opening by suggesting that colors be changed. :wink:

I've seen some interest in "color themes" or other ways of allowing users to customize their game. If you're going through the trouble of changing all the colors, it may be worth creating global variables for each "class" of GUI window (perhaps Town, Industry, Graph, System, Toolbar, etc) which can be easily changed from one place. That could eventually become an in-game menu which also allows the user to select fonts, but may simply live in the .cfg file where fonts and other user preferences are currently stored.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 9 guests