Proposal for colors and other privitive values

Currently colors are coded like this:

<StartColor R="255" G="255" B="0" A="180"/>

I think it should be better to define Color as a “primitive type” and refer it by link, so that ColorBuilder can be reused.

<StartColor value="RedColor"> <Color id="RedColor"> <R value="255"> <G value="0"> <B value="0"> <A value="255"> </Color>

Even better should be the “Android” way, with colors defined on color.xml and referred like @color/red, but the would mean more work.

+1 from my side. Sound absolutely logical. It easy to change the EntityEditor to support this. But until now I can’t say, which must be changed in OpenRTS builders.

To have a color builder seems to be usefull ta call many times the same color. But the parser should be able to catch rgb values as well since you don’t want to create a color definition for each you color you want to use/test

So we need flexibility on that :smile: I look forward to see how you will achieve that !

Since we’re talking about hard-coded color value, I think it’s reasonable to have a different definition for each color. If your colors are created/altered by code then you don’t wan’t hard-coded values. Maybe we can plug in a ProceduralColorBuilder that accepts a seed or something… I’ll think of it when needs arises :wink: