Player Color and Color Value

SneoplesGov

Chieftain
Joined
Apr 25, 2016
Messages
11
Alright, say I wanted to create a new player color for a civilization -- let's go with Argentina.

First I would go into CIV4PlayerColorInfos.xml and created a new Player Color, like so:

Spoiler :
<PlayerColorInfo>
<Type>PLAYERCOLOR_ARGENTINA</Type>
<ColorTypePrimary>COLOR_PLAYER_ARGENTINA1</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_ARGENTINA2</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_ARGENTINA_TEXT</TextColorType>
</PlayerColorInfo>

Alright, so now (I assume) I would have to create new values for those colors I just created. So, I go into CIV4ColorVals.xml and create a new Color Value.

Spoiler :
<ColorVal>
<Type>COLOR_PLAYER_ARGENTINA1</Type>
<fRed>0.13</fRed>
<fGreen>0.13</fGreen>
<fBlue>0.13</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>

What I'm wondering is: What numbers would I need to enter to get the color I want? Is there a particular color model I need to follow? Is any of this possible at all?

Any help is appreciated, thank you.
 
From Wikipedia: "The RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three additive primary colors, red, green and blue."

So yes, everything is possible, the game accepts all the percentages for Red, Green and Blue.

How to define colors? Online, you can find tables with all the numbers.

Like this extract:
Name Red Green Blue
Wood brown 76% 60% 42%
Xanadu 45% 53% 47%
Yale Blue 6% 30% 57%
Yankees blue 11% 16% 25%
Yellow 100% 100% 0%
 
I knew there was a tool like that somewhere. Thanks for the link! ;)
 
Back
Top Bottom