There's been some discussion about how colors are and should be managed in Simutrans in the GUI Theme topic. To avoid derailing it, I'll post further facts and ideas here.
Colors in Simutrans can currently be divided into three categories: real colors, player colors and light colors. Real colors are the full range of 15-bit RGB values. As far as I know, until recently, all these come from images in pak files.
Player colors are 28 gradients of 8 colors, 224 in total. From these, each player may select two gradient ranges for use as that players primary and secondary color.
Light colors are 15 colors which have defined an unlit daytime color value and a lit nighttime color value.
The 224 player colors and 15 daytime light colors are combined, along with black padding, are combined into a list of 256 colors. These colors are what's been used for drawing the non-image based parts of the GUI so far. There also exists a corresponding list of the same 256 colors adjusted for the day-night cycle (except that lights are not lit), which I'm not sure what is used for.
All 32768 real colors, the 16 colors for a currently selected player (not the active player in the game) and the 15 colors for the lights are also combined into two gigantic lists used for converting pak images into the final colors displayed on screen. One liste is in full daylight, while the other changes with the day-night cycle, including lights being lit.
For the new GUI, it's a good idea to break away from using player colors only for doing the GUI. When doing so, it makes little sense to use the light colors in the GUI. I've tried to sketch out the contents and relationships between the different sets of colors, here represented by manager classes. The nature of the theme color manager is just a stab in the dark, while the light and player colors are dictated by the pak image format. I've omitted the real colors, showing only the 31 special colors in WorldColorManger. The list of functions in each class is by no means exhaustive, and just shows the most important and non-trivial in terms of making use of the class.