Color value table with 150+ additional colors

SimCutie

Warlord
Joined
Dec 10, 2005
Messages
197
:nuke: Civ4 Color Value Table by SimCutie

Version 1.0 (2005-12-12)
Version 1.1 (2006-01-22) - small update and fix.
by SimCutie of CivFanatics <simcutie (AT) hanmail (DOT) com >
URL : http://forums.civfanatics.com/showthread.php?t=147308

CHANGES: from 1.0 to 1.1
  1. Color name of "COLOR_X_LIGHTGREY" is changed to ""COLOR_X_LIGHTGRAY" for consistancy with other part.
  2. Small positional re-arrangement to enhance compatibility with Firaxis original table.
  3. Color sample table HTML for all colors in the "CIV4ColorVals.xml" table.
This is additional color value table for "Sid Meier's Civilization 4" game.
It is not standalone mod but a resource XML file that can be used by Civ4 mod creator and player.

Original Civ4 game comes with only small limited number of color values.
It limits modder and player in selecting new color scheme.
Adding more color is possible, but it needs tedious and error-prone XML editing.
Using different color table is also source of incompatibility among mod's

No more with is color table.
This file has large selection of colors ( more than 150 colors) so that
It will hardly need to add addtional colors to it.
There may be duplicated colors with existing colors (same color with different name) but they does not do any harm.

To use these colors in your mods, put the "CIV4ColorVals.xml" to:

1) Player's ~My Documents/My Games/Sid Meier's Civilization 4/
CustomAssets/xml/interface
folder (preferred)
-or-
2) ... MODS/<mod-name>/Assets/xml/interface folder if used with custom mods.

To use there in your Python code, use as string value:
Code:
 str = localText.getText("[B][COLOR_W_ORANGE][/B]Text in Orange\
              Name = %s1 [COLOR_REVERT]Now white text again.", (str(Name),)) 
 self.drawLine(screen, x1, y1, x2, y2,\
              gc.getInfoTypeForString("[B]COLOR_X_SALMON[/B]"))
Or in text resource XML, embrcae color name with squre brackets.
Code:
<TEXT>
	<Tag>TXT_KEY_MISC_GP_BORN</Tag>
	<English>[COLOR_UNIT_TEXT]%s1_GPName[COLOR_REVERT] has been born in
	[B][COLOR_X_LIGHTSKYBLUE][/B]%s2_CityName[COLOR_REVERT]!</English>
	<French>Naissance de [COLOR_UNIT_TEXT]%s1_GPName[COLOR_REVERT] à
	[B][COLOR_X_LIGHTSKYBLUE][/B]%s2_CityName[COLOR_REVERT] !</French>
	....
</TEXT>
Additional avilable colors:

  1. Web browser / HTML basic colors (16 colors)
  2. Orange color and 25%, 50%, 75% transparency. (4 colors)
  3. 140 named colors from X11 Window system "rgb.txt" (140 colors)
    Most web browser supports these colors, too.
  4. gray 0% (black), 10%, ... 90%, 100% (White) - (11 gray level)
1, 2 category color name starts with "COLOR_W_ ..." prefix.
(ex: COLOR_W_AQUA, COLOR_W_BLUE, COLOR_W_ORANGE, COLOR_W_CLEARTHIN )
Note that COLOR_W_GREEN is different color from COLOR_GREEN
Original COLOR_GREEN is same color with COLOR_W_LIME.

3, 4 category color name starts with "COLOR_X_ ..." prefix.
(ex: COLOR_X_ALICEBLUE, COLOR_X_BLUEVIOLET, COLOR_X_GOLD, COLOR_X_GRAY80 )
Note that COLOR_X_ORANGE is slightly different color from COLOR_W_ORANGE.

This file can be distributed freely along with your own mod file as long as due credit is given to me, SimCutie
Feel free to ask any question or suggestion.

EDIT: Color sample table HTML file is inserted. See for list of 140 X11 colors


.
 

Attachments

  • CIV4-Colors-SimCutie10.zip
    11.2 KB · Views: 574
  • CIV4-Colors-SimCutie11.zip
    16.5 KB · Views: 547
I'd say this would perfect for new civ colors and flags haarbal. :)
 
Hold up a minute............. how will I use this mod?
 
It is not a mod... it is an XML resource... if you read the readme.html file included in the .zip, you will understand this, and you will find out that this is freely distributed and used for all modders.

It is part of SimCuties efforts to create standardization among mods and to fix the colors so that colors appear the same on machines. She says herself "This file can be distributed freely along with your own mod file."

However if you are to use her work in your mod, it is only courteous (and in my opinion a must) to include her name for her work.

Thanks alot SimCutie!
 
didnt download it thats why.............
 
i wish i could have this before!!!!

even if i can't use it (would be terribly messy with the file or it will be a new version of superciv by itself) thank you for all modders
 
Sorry for the major bump, but I am having problems with this.

I am using this for a mod, and when I replaced my mod's ColorVals xml file, an boots up the mod I get a bunch of errors saying that "such and such" is incorrect.

Do I have to add the colors to the player colors xml files too?
 
Top Bottom