Template:Color

天津风不是天津的风讨论 | 贡献2024年11月6日 (三) 18:59的版本 (创建页面,内容为“<includeonly><span {{#switch:{{{1}}} |black = class="effect-black" style="color: rgb(0% 0% 0% / 60%); |blue = class="effect-blue" style="color: rgb(41% 67% 74%); |gold = class="effect-gold" style="color: rgb(100% 67.4% 45.4%); |green = class="effect-green" style="color: rgb(39% 67% 33%); |light_green = class="effect-light_green" style="color: rgb(25% 57% 45%); |grey = class="effect-grey" style="color: rgb(60% 57% 55%); |red = class="effect-red" style="color: rg…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
[阅读] [编辑]Template-info.png 模板文档

Makes text bold and colored, using game text colors or a custom color. Note that the preset shades of red and green in this template are different from those in {{Red}} and {{Green}}.

Usage

The first parameter sets the color according to the list below; the second parameter sets the text; the third parameter applies a background effect if defined

{{color|red|text you want red}} gives text you want red

{{color|green|text you want green|1}} gives text you want green

Text can be left unbolded by setting the parameter bold to normal; so {{color|red|unbolded text|bold=normal}} gives unbolded text

Numerical font weights can also be used as a CSS font-weight value.

List of colors

Victoria 3 defines text colors using percentage RGB (as 0-1); the following colors are pre-defined in this template and can be found in Victoria 3\game\gui/textformatting.gui

Color key rgb (/ alpha)
black black 0% 0% 0% / 60%
blue blue 41% 67% 74%
gold gold 100% 67.4% 45.4%
green green 39% 67% 33%
light_green light_green 25% 57% 45%
grey grey 60% 57% 55%
red red 88% 34% 34%
white white 94% 95% 88%
darker_white darker_white 76% 74% 72%
yellow yellow 100% 97% 66%
Custom colors can be used by defining any valid CSS color value. For example, {{color|#cc11cc|hexcode}} gives hexcode