# 七、新的颜色系统

## 说明

在风起云涌中，《文明6》终于改掉了脑残功能：每个领袖的文明图标颜色是不一样的，而这个图标是单独的图标，不能够通过Symbols来生成的，也就是说，如果你要是在风起云涌之前为每个领袖添加图标，都需要从游戏中截图并放入Mod打包。

而在风起云涌这个版本，领袖图标会通过Symbols+特定配色生成，在版本更新迭代几次后，我推荐使用这个功能，而不要使用我在第四章说的那个古老功能。

![你可以在游戏目录下的这个位置找到颜色文件](/files/-LnVWZnJ8csERM3JfqiM)

我推荐使用文明6的预设颜色来完成这个功能，而不是自己新建颜色，而颜色预设就在这三个Xml中。

```markup
	<PlayerColors>
		<Row>
			<Type>LEADER_FSN_ARCHER_EMIYA</Type>
			<Usage>Unique</Usage>
			<PrimaryColor>COLOR_STANDARD_ORANGE_LT</PrimaryColor>
			<SecondaryColor>COLOR_STANDARD_RED_DK</SecondaryColor>
			<Alt1PrimaryColor>COLOR_STANDARD_WHITE_LT</Alt1PrimaryColor>
			<Alt1SecondaryColor>COLOR_STANDARD_RED_MD</Alt1SecondaryColor>
			<Alt2PrimaryColor>COLOR_STANDARD_RED_LT</Alt2PrimaryColor>
			<Alt2SecondaryColor>COLOR_STANDARD_WHITE_DK</Alt2SecondaryColor>
			<Alt3PrimaryColor>COLOR_STANDARD_WHITE_LT</Alt3PrimaryColor>
			<Alt3SecondaryColor>COLOR_STANDARD_ORANGE_LT</Alt3SecondaryColor>
		</Row>
	</PlayerColors>
```

{% hint style="info" %}
这个很简单，不需要讲解了，下面有对照，注意Usage必须为Unique（唯一），保证Type是领袖Id。

这个东西需要通过UpdateColors这个Actions被加载入游戏中，而且FrontEnd和InGame都需要。
{% endhint %}

每个领袖可以有四种配色，每个配色分别是前景色和背景色，当你写完之后，在多人游戏中可以选择颜色，而单人游戏中，默认为第一个配色方案。

{% hint style="info" %}
每个颜色分为LT,MD,DK,分别是浅，中，深，WHITE的深色是黑色，前缀都是COLOR\_STANDARD，具体的颜色什么样子还是查XML吧。

RED,WHITE,BLUE,GREEN,YELLOW,ORANGE,AQUA,PURPLE,这几种颜色可以使用这个规则。

你也可以自己添加新的颜色，然后使用这个功能来实现。
{% endhint %}

![这个颜色有点丑……我后来改了，不过和上面的代码是一样的](/files/-LnVYOhVByju_kUu8kOv)

## 实现

![单独放在一个xml中](/files/-LnVYfVnI19mV2DPMp1x)

![FrontEnd用于合并选择界面小图标](/files/-LnVYkFpi-rVeAE7PnWW)

![InGame用于游戏配色](/files/-LnVYpWCLhVe8KfKXyUC)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://haojun0823.gitbook.io/randerion-civ-mod-guide/qi-xin-de-yan-se-xi-tong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
