Template:BrewerColors/doc

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

This template shows the Brewer colors. Based on specifications and designs developed by Cynthia Brewer ([1]). These color palettes can be used for statistical diagrams and for maps.

To translate or review the translation of the module to your language, edit carefully Data:I18n/BrewerColors.tab.

Syntax

[edit source]
{{BrewerColors|color palette|number of colors|show the color number}}

The number of colors must be from 3 to 9 or 12, according to the palette.

Show the color number is an optional parameter, with two values: '-' the color number and 'a' with the degree of transparency (alpha channel) added at the end of the number and always it will be 'ff'. It is only interesting to add the color for the map coloring.

Brewers color palettes

[edit source]

Valid names and full color representation for each palette. Moving the mouse cursor over each box the color number appears.

Sequential (1-9)
Divergent (1-11)
Qualitative (1-8/12)

Template data

[edit source]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:BrewerColors in articles based on its TemplateData.

TemplateData for BrewerColors

Show colors of Brewer palettes

Template parameters

ParameterDescriptionTypeStatus
Palette name1

Name of the palette to use

Linerequired
Number of colors2

The number of colors to show on the palette, from 3 to 9/12

Numberrequired
Show color number3

Write the color number after the box: - (only number) or (with alpha channel)

Numberoptional

Examples

[edit source]
Code Result
{{BrewerColors|Greens|3}} Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/ComplForColorModules.tab.
{{BrewerColors|Greens_i|3}} Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/ComplForColorModules.tab.
{{BrewerColors|Set1|8}} Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/ComplForColorModules.tab.
{{BrewerColors|Accent|4|-}} Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/ComplForColorModules.tab.
{{BrewerColors|Accent|4|a}} Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/ComplForColorModules.tab.

See also

[edit source]