Module:Color/doc

这是Module:Color的文档页面

This module is similar to {{Color}} but for modules.

Makes text bold and colored, using game text colors or a custom color.

Usage

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

color('red','text you want red') gives text you want red

color('green','text you want green',{backing=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%
green wiki_green 0% 128% 0%
light_green light_green 25% 57% 45%
grey grey 60% 57% 55%
red red 88% 34% 34%
red wiki_red 255% 0% 0%
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. Setting the parameter html or css to anything allows the use of CSS named colors that overlap the keys above.