Jump to content

Module:BrewerColors/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jmarchn (talk | contribs) at 21:12, 26 October 2019 (Created page with 'Used by '''{{tl|BrewerColors}}''' and '''{{tl|BrewerColorLegends}}''' {{ForMultilingualTrans|BrewerColors}} ===Function ShowColors=== {| class="wikitable" |- !...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Used by {{BrewerColors}} and {{BrewerColorLegends}}

Template:ForMultilingualTrans

Function ShowColors

Code Result
{{#invoke:BrewerColors|ShowColors|Oranges|5}}                    
{{#invoke:BrewerColors|ShowColors|Oranges_i|5}}                    
{{BrewerColors|Greens|9}}                                    
{{#invoke:BrewerColors|ShowColors|YlGn|3|-}}     #f7fcb9       #addd8e       #31a354  
{{#invoke:BrewerColors|ShowColors|YlGn|3|a}}     #f7fcb9ff       #addd8eff       #31a354ff  

Function Legends

{{#invoke:BrewerColors|Legends|Oranges|5|2}}

produces:

  • feedde
  • fdbe85
  • fd8d3c
  • e6550d
  • a63603
  • {{div col|colwidth=2}}
     {{legend|#feedde|}}
     {{legend|#fdbe85|}}
     {{legend|#fd8d3c|}}
     {{legend|#e6550d|}}
     {{legend|#a63603|}}
    {{div col end}}
    


    {{#invoke:BrewerColors|Legends|Greens|3|1|--Without data|One|Two|Three}}
    

    produces:

  • Without data
  • One
  • Two
  • Three
  • {{div col|colwidth=1}}
     {{legend|#b3b3b3|Without data}}
     {{legend|#e5f5e0|One}}
     {{legend|#a1d99b|Two}}
     {{legend|#31a354|Three}}
    {{div col end}}