• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:BrewerColorLegends/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:BrewerColorLegends
This is the template sandbox page for Template:BrewerColorLegends (diff).
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:BrewerColors (sandbox)

This template shows the Brewer colors with {{legend}} to include in the code. Based on specifications and designs developed by Cynthia Brewer ([1]).

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

Contents

  • 1 Syntax
  • 2 Brewer's color palettes
  • 3 Template data
  • 4 Examples
    • 4.1 With legend text
    • 4.2 Without legend text
  • 5 See also

Syntax

edit
{{BrewerColorLegends|color palette|color number|column width|..}}

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

Brewer's color palettes

edit

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

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

TemplateData for BrewerColorLegends

Display a Brewer's color palette

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Palette1

Name of the color palette to use

Linerequired
Color number2

Color number required from 3 to 9/12

Numberrequired
Column width3

Width of columns showing colors (and text). Leave blank for no columns

Linerequired
Legend 14

Text for the 1st color

Lineoptional
Legend 25

Text for the 2nd color

Lineoptional
Legend 36

Text for the 3rd color

Lineoptional
Legend 47

Text for the 4th color

Lineoptional
Legend 58

Text for the 5th color

Lineoptional
Legend 69

Text for the 6th color

Lineoptional
Legend 710

Text for the 7th color

Lineoptional
Legend 811

Text for the 8th color

Lineoptional
Legend 912

Text for the 9th color

Lineoptional
Legend 1013

Text for the 10th color

Lineoptional
Legend 1114

Text for the 11th color

Lineoptional
Legend 1215

Text for the 12th color

Lineoptional

Examples

edit

With legend text

edit
{{BrewerColorLegends|Oranges|4|30em|One|Two|Three|Four}}

produces:

  • One
  • Two
  • Three
  • Four
  • {{div col|colwidth=30em}}
     {{legend|#feedde|One}}
     {{legend|#fdbe85|Two}}
     {{legend|#fd8d3c|Three}}
     {{legend|#d94701|Four}}
    {{div col end}}
    

    Without legend text

    edit
    {{BrewerColorLegends|Set3|10|20em}}
    

    produces:

  • 8dd3c7
  • ffffb3
  • bebada
  • fb8072
  • 80b1d3
  • fdb462
  • b3de69
  • fccde5
  • d9d9d9
  • bc80bd
  • {{div col|colwidth=20em}}
     {{legend|#8dd3c7|}}
     {{legend|#ffffb3|}}
     {{legend|#bebada|}}
     {{legend|#fb8072|}}
     {{legend|#80b1d3|}}
     {{legend|#fdb462|}}
     {{legend|#b3de69|}}
     {{legend|#fccde5|}}
     {{legend|#d9d9d9|}}
     {{legend|#bc80bd|}}
    {{div col end}}
    

    See also

    edit
    • {{BrewerColors}}
    The above documentation is transcluded from Template:BrewerColorLegends/doc. (edit | history)
    Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
    Add categories to the /doc subpage. Subpages of this template.
    Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:BrewerColorLegends/sandbox&oldid=968182371"
    Last edited on 17 July 2020, at 19:14

    Languages

        This page is not available in other languages.

        Wikipedia
        • Wikimedia Foundation
        • Powered by MediaWiki
        • This page was last edited on 17 July 2020, at 19:14 (UTC).
        • Content is available under CC BY-SA 4.0 unless otherwise noted.
        • Privacy policy
        • About Wikipedia
        • Disclaimers
        • Contact Wikipedia
        • Code of Conduct
        • Developers
        • Statistics
        • Cookie statement
        • Terms of Use
        • Desktop