ColorType (Civ5 Type)

From Civilization Modding Wiki
Jump to: navigation, search

This page is a part of the Lua and UI Reference (Civ5).


ID.png The ColorType pseudo-type is actually a regular integer. Pseudo-types do not exist in Lua, they only serve a documentation purpose on the wiki!
  • DB.png Integers labeled as ColorType corresponds to the ID column of the Colors XML table.


XML: the Colors table

Here are the ID and Type columns found in this table.

ID Type
0 COLOR_CLEAR
0 COLOR_PLAYER_AUSTRIA_ICON
1 COLOR_ALPHA_GREY
1 COLOR_PLAYER_AUSTRIA_BACKGROUND
2 COLOR_WHITE
2 COLOR_PLAYER_BYZANTIUM_ICON
3 COLOR_BLACK
3 COLOR_PLAYER_BYZANTIUM_BACKGROUND
4 COLOR_DARK_GREY
4 COLOR_PLAYER_CARTHAGE_ICON
5 COLOR_GREY
5 COLOR_PLAYER_CARTHAGE_BACKGROUND
6 COLOR_LIGHT_GREY
6 COLOR_PLAYER_CELTS_ICON
7 COLOR_GREEN
7 COLOR_PLAYER_CELTS_BACKGROUND
8 COLOR_BLUE
8 COLOR_PLAYER_ETHIOPIA_ICON
9 COLOR_XP_BLUE
9 COLOR_PLAYER_ETHIOPIA_BACKGROUND
10 COLOR_CYAN
10 COLOR_PLAYER_HUNS_ICON
11 COLOR_YELLOW
11 COLOR_PLAYER_HUNS_BACKGROUND
12 COLOR_MAGENTA
12 COLOR_PLAYER_MAYA_ICON
13 COLOR_YIELD_FOOD
13 COLOR_PLAYER_MAYA_BACKGROUND
14 COLOR_YIELD_PRODUCTION
14 COLOR_PLAYER_NETHERLANDS_ICON
15 COLOR_YIELD_GOLD
15 COLOR_PLAYER_NETHERLANDS_BACKGROUND
16 COLOR_CITY_BLUE
16 COLOR_PLAYER_SWEDEN_ICON
17 COLOR_CITY_GREY
17 COLOR_PLAYER_SWEDEN_BACKGROUND
18 COLOR_CITY_BROWN
18 COLOR_FADING_POSITIVE_TEXT
19 COLOR_CITY_GREEN
19 COLOR_FADING_NEGATIVE_TEXT
20 COLOR_FONT_RED
21 COLOR_FONT_GREEN
22 COLOR_RESEARCH_STORED
23 COLOR_RESEARCH_RATE
24 COLOR_CULTURE_STORED
25 COLOR_CULTURE_RATE
26 COLOR_GREAT_PEOPLE_STORED
27 COLOR_GREAT_PEOPLE_RATE
28 COLOR_NEGATIVE_RATE
29 COLOR_EMPTY
30 COLOR_POPUP_TEXT
31 COLOR_POPUP_SELECTED
32 COLOR_TECH_TEXT
33 COLOR_UNIT_TEXT
34 COLOR_BUILDING_TEXT
35 COLOR_PROJECT_TEXT
36 COLOR_HIGHLIGHT_TEXT
37 COLOR_ALT_HIGHLIGHT_TEXT
38 COLOR_WARNING_TEXT
39 COLOR_POSITIVE_TEXT
40 COLOR_NEGATIVE_TEXT
41 COLOR_BROWN_TEXT
42 COLOR_SELECTED_TEXT
43 COLOR_WATER_TEXT
44 COLOR_MENU_BLUE
45 COLOR_DAWN_OF_MAN_TEXT
46 COLOR_ADVISOR_HIGHLIGHT_TEXT
47 COLOR_TECH_GREEN
48 COLOR_TECH_BLUE
49 COLOR_TECH_WORKING
50 COLOR_TECH_BLACK
51 COLOR_TECH_RED
52 COLOR_RED
53 COLOR_PLAYER_BLACK
54 COLOR_PLAYER_BLACK_TEXT
55 COLOR_PLAYER_BLUE
56 COLOR_PLAYER_LIGHT_BLUE_TEXT
57 COLOR_PLAYER_BROWN
58 COLOR_PLAYER_BROWN_TEXT
59 COLOR_PLAYER_CYAN
60 COLOR_PLAYER_CYAN_TEXT
61 COLOR_PLAYER_DARK_BLUE
62 COLOR_PLAYER_DARK_BLUE_TEXT
63 COLOR_PLAYER_DARK_CYAN
64 COLOR_PLAYER_DARK_CYAN_TEXT
65 COLOR_PLAYER_DARK_GREEN
66 COLOR_PLAYER_DARK_DARK_GREEN
67 COLOR_PLAYER_DARK_GREEN_TEXT
68 COLOR_PLAYER_DARK_PINK
69 COLOR_PLAYER_DARK_PINK_TEXT
70 COLOR_PLAYER_DARK_PURPLE
71 COLOR_PLAYER_DARK_PURPLE_TEXT
72 COLOR_PLAYER_DARK_RED
73 COLOR_PLAYER_DARK_RED_TEXT
74 COLOR_PLAYER_DARK_YELLOW
75 COLOR_PLAYER_DARK_YELLOW_TEXT
76 COLOR_PLAYER_GRAY
77 COLOR_PLAYER_GRAY_TEXT
78 COLOR_PLAYER_GREEN
79 COLOR_PLAYER_GREEN_TEXT
80 COLOR_PLAYER_ORANGE
81 COLOR_PLAYER_ORANGE_TEXT
82 COLOR_PLAYER_PEACH
83 COLOR_PLAYER_PEACH_TEXT
84 COLOR_PLAYER_PINK
85 COLOR_PLAYER_PINK_TEXT
86 COLOR_PLAYER_PURPLE
87 COLOR_PLAYER_PURPLE_TEXT
88 COLOR_PLAYER_RED
89 COLOR_PLAYER_RED_TEXT
90 COLOR_PLAYER_WHITE
91 COLOR_PLAYER_WHITE_TEXT
92 COLOR_PLAYER_YELLOW
93 COLOR_PLAYER_YELLOW_TEXT
94 COLOR_PLAYER_LIGHT_GREEN
95 COLOR_PLAYER_LIGHT_GREEN_TEXT
96 COLOR_PLAYER_LIGHT_BLUE
97 COLOR_PLAYER_BLUE_TEXT
98 COLOR_PLAYER_LIGHT_YELLOW
99 COLOR_PLAYER_LIGHT_YELLOW_TEXT
100 COLOR_PLAYER_LIGHT_PURPLE
101 COLOR_PLAYER_LIGHT_PURPLE_TEXT
102 COLOR_PLAYER_LIGHT_ORANGE
103 COLOR_PLAYER_LIGHT_ORANGE_TEXT
104 COLOR_PLAYER_MIDDLE_PURPLE
105 COLOR_PLAYER_MIDDLE_PURPLE_TEXT
106 COLOR_PLAYER_GOLDENROD
107 COLOR_PLAYER_DARK_GRAY
108 COLOR_PLAYER_DARK_GRAY_TEXT
109 COLOR_PLAYER_MIDDLE_GREEN
110 COLOR_PLAYER_MIDDLE_GREEN_TEXT
111 COLOR_PLAYER_DARK_LEMON
112 COLOR_PLAYER_DARK_LEMON_TEXT
113 COLOR_PLAYER_MIDDLE_BLUE
114 COLOR_PLAYER_MIDDLE_BLUE_TEXT
115 COLOR_PLAYER_MIDDLE_CYAN
116 COLOR_PLAYER_MIDDLE_CYAN_TEXT
117 COLOR_PLAYER_MAROON
118 COLOR_PLAYER_LIGHT_BROWN
119 COLOR_PLAYER_LIGHT_BROWN_TEXT
120 COLOR_PLAYER_DARK_ORANGE
121 COLOR_PLAYER_DARK_ORANGE_TEXT
122 COLOR_PLAYER_DARK_DARK_GREEN_TEXT
123 COLOR_PLAYER_PALE_RED
124 COLOR_PLAYER_DARK_INDIGO
125 COLOR_PLAYER_DARK_INDIGO_TEXT
126 COLOR_PLAYER_PALE_ORANGE
127 COLOR_PLAYER_LIGHT_BLACK
128 COLOR_PLAYER_LIGHT_BLACK_TEXT
129 COLOR_PLAYER_MINOR_ICON
130 COLOR_PLAYER_BARBARIAN_ICON
131 COLOR_PLAYER_AMERICA_ICON
132 COLOR_PLAYER_ARABIA_ICON
133 COLOR_PLAYER_AZTEC_ICON
134 COLOR_PLAYER_CHINA_ICON
135 COLOR_PLAYER_EGYPT_ICON
136 COLOR_PLAYER_ENGLAND_ICON
137 COLOR_PLAYER_FRANCE_ICON
138 COLOR_PLAYER_GERMANY_ICON
139 COLOR_PLAYER_GREECE_ICON
140 COLOR_PLAYER_INDIA_ICON
141 COLOR_PLAYER_IROQUOIS_ICON
142 COLOR_PLAYER_JAPAN_ICON
143 COLOR_PLAYER_OTTOMAN_ICON
144 COLOR_PLAYER_PERSIA_ICON
145 COLOR_PLAYER_ROME_ICON
146 COLOR_PLAYER_RUSSIA_ICON
147 COLOR_PLAYER_SIAM_ICON
148 COLOR_PLAYER_SONGHAI_ICON
149 COLOR_PLAYER_BARBARIAN_BACKGROUND
150 COLOR_PLAYER_AMERICA_BACKGROUND
151 COLOR_PLAYER_ARABIA_BACKGROUND
152 COLOR_PLAYER_AZTEC_BACKGROUND
153 COLOR_PLAYER_CHINA_BACKGROUND
154 COLOR_PLAYER_EGYPT_BACKGROUND
155 COLOR_PLAYER_ENGLAND_BACKGROUND
156 COLOR_PLAYER_FRANCE_BACKGROUND
157 COLOR_PLAYER_GERMANY_BACKGROUND
158 COLOR_PLAYER_GREECE_BACKGROUND
159 COLOR_PLAYER_INDIA_BACKGROUND
160 COLOR_PLAYER_IROQUOIS_BACKGROUND
161 COLOR_PLAYER_JAPAN_BACKGROUND
162 COLOR_PLAYER_OTTOMAN_BACKGROUND
163 COLOR_PLAYER_PERSIA_BACKGROUND
164 COLOR_PLAYER_ROME_BACKGROUND
165 COLOR_PLAYER_RUSSIA_BACKGROUND
166 COLOR_PLAYER_SIAM_BACKGROUND
167 COLOR_PLAYER_SONGHAI_BACKGROUND


Examples

Here are different ways to query the database to retrieve the ID from the type. Those examples will return and assign the integer value 0. See also GameInfo.

local id = GameInfo.Colors.COLOR_PLAYER_AUSTRIA_ICON.ID
local id = GameInfo["Colors"].["COLOR_PLAYER_AUSTRIA_ICON"].ID
local id = GameInfo.Colors{Type="COLOR_PLAYER_AUSTRIA_ICON"}().ID

Alternatively you could use the ID or the type to retrieve the value of the Red column. Those examples will return and assign the value 1.

local red = GameInfo.Colors[0].Red
local red = GameInfo["Colors"][0]["Red"]
local red = GameInfo.Colors{ID=0}().Red


Used by

ColorType Game.GetReplayMessageColor(int i)
ColorType Player:GetPlayerColor()



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.