Template:BrewerColorLegends/doc

This template shows the Brewer colors with legend to include in the code. Based on specifications and designs developed by Cynthia Brewer.

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

Syntax


The color number must be 3 to 8-12, depending on the color palette:

Brewer's color palettes
Valid names and full color representation for each palette. Moving the mouse cursor over each box the color number appears. Sequential (1-9)


 * YlGn
 * YlGnBu
 * GnBu
 * BuGn
 * PuBuGn
 * PuBu
 * BuPu
 * RdPu
 * PuRd
 * OrRd
 * YlOrRd
 * YlOrBr
 * Purples
 * Blues
 * Greens
 * Oranges
 * Reds
 * Greys

Divergent (1-11)


 * PuOr
 * BrBG
 * PRGn
 * PiYG
 * RdBu
 * RdGy
 * RdYlBu
 * Spectral
 * RdYlGn

Qualitative (1-8/12)


 * Accent
 * Dark2
 * Paired
 * Pastel1
 * Pastel2
 * Set1
 * Set2
 * Set3

Template data
{       "description": "Display a Brewer's color palette", "params": { "1": {                       "label": "Palette", "description": "Name of the color palette to use", "type": "line", "required": true },               "2": {                        "label": "Color number", "description": "Color number required from 3 to 9/12", "type": "number", "required": true },               "3": {                        "label": "Column width", "description": "Width of columns showing colors (and text). Leave blank for no columns", "type": "line", "required": true },               "4": {                        "label": "Legend 1", "description": "Text for the 1st color", "type": "line", "required": false },               "5": {                        "label": "Legend 2", "description": "Text for the 2nd color", "type": "line", "required": false },               "6": {                        "label": "Legend 3", "description": "Text for the 3rd color", "type": "line", "required": false },               "7": {                        "label": "Legend 4", "description": "Text for the 4th color", "type": "line", "required": false },               "8": {                        "label": "Legend 5", "description": "Text for the 5th color", "type": "line", "required": false },               "9": {                        "label": "Legend 6", "description": "Text for the 6th color", "type": "line", "required": false },               "10": {                        "label": "Legend 7", "description": "Text for the 7th color", "type": "line", "required": false },               "11": {                        "label": "Legend 8", "description": "Text for the 8th color", "type": "line", "required": false },               "12": {                        "label": "Legend 9", "description": "Text for the 9th color", "type": "line", "required": false },               "13": {                        "label": "Legend 10", "description": "Text for the 10th color", "type": "line", "required": false },               "14": {                        "label": "Legend 11", "description": "Text for the 11th color", "type": "line", "required": false },               "15": {                        "label": "Legend 12", "description": "Text for the 12th color", "type": "line", "required": false }       } }

With legend text
produces:

Without legend text
produces: