Template:Color/doc

这是Template:Color的模板文档
当直接浏览时,使用变量可能会失效,请不要使用硬编码来代替页面名或地址。

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