[DRAFT] Centralize Styling to allow for Themes#2109
Draft
Zoooombie wants to merge 5 commits into
Draft
Conversation
added 5 commits
June 6, 2026 13:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #535 (to some degree).
This is a draft because I have not done everything yet (I have not touched the calcs tab at all for example). Additionally some parts I could not figure out what they did, so I left them as is.
Open to feedback and help with understanding missing parts.
Description of the problem being solved:
Currently most colors and fonts are defined inline when drawing anything. This means color definitions are scattered across the code base making changing the theme of PoB a nightmare. I propose a CSS inspired approach where colors are defined in one central location with drawing logic referencing these through abstracted names (e.g. 'button_background' instead of #000000 in button definition). This way we can change what 'button_background' as a color means depending on the active theme.
To achieve this I made small wrappers for these functions to use style names (like 'button_background') instead of a color/font in Style.lua:
I made 2 seperate themes to demonstrate the change:
Note: I went through the draw calls and changed them by hand. I did not use AI for any changes to existing code.
After screenshots:
Here are some screenshots of the same views with both themes
Options


Configuration


Tree


Items


Calcs

