Template:Colored list/doc

From MOASSpedia
Jump to navigation Jump to search

Creates a list where each item is colored with a contrasting color, e.g.:

  • Seven
  • One
  • Two
  • Four
  • Eight
  • Nine
  • Five
  • Ten
  • Three
  • Six

Usage

{{Colored list|list items|pre=item prefix|tag=HTML tag for each item|style=CSS|class="list class"|sep="item separator"|s='color sequence (see below)'}}

All named parameters are optional, and default to:

pre    = * (bulleted list)
tag    = span
style  = (none)
class  = (none)
sep    = \n (new line)
s      = category10
Input Output
{{Colored list|One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten}}
  • Seven
  • One
  • Two
  • Four
  • Eight
  • Nine
  • Five
  • Ten
  • Three
  • Six
{{Colored list|One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|pre=#}}
  1. Seven
  2. One
  3. Two
  4. Four
  5. Eight
  6. Nine
  7. Five
  8. Ten
  9. Three
  10. Six
{{Colored list|One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|pre=|tag=i|style=font-weight: bold|sep=;}} Seven;One;Two;Four;Eight;Nine;Five;Ten;Three;Six
{{Colored list|One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|class=hlist}}
  • Seven
  • One
  • Two
  • Four
  • Eight
  • Nine
  • Five
  • Ten
  • Three
  • Six
{{Colored list|One|Two|class=plainlist}}
  • One
  • Two
{{Colored list|1=1+1=2|2=2+2=4}} -or-
{{Colored list|1+1{{=}}2|2+2{{=}}4}}
  • 1+1=2
  • 2+2=4

Color sequences

The following color sequences are available, mostly taken from the D3 3.x API and colorbrewer:

accent:

  • 7
  • 1
  • 2
  • 4
  • 8
  • 5
  • 3
  • 6

calc:

  • 7
  • 1
  • 2
  • 4
  • 8
  • 5
  • 3
  • 6

excel:

  • 7
  • 1
  • 2
  • 4
  • 8
  • 5
  • 3
  • 6

category10 or category:

  • 7
  • 1
  • 2
  • 4
  • 8
  • 9
  • 5
  • 10
  • 3
  • 6

dark2 or dark:

  • 7
  • 1
  • 2
  • 4
  • 8
  • 5
  • 3
  • 6

set1 or set:

  • 7
  • 1
  • 2
  • 4
  • 8
  • 9
  • 5
  • 3
  • 6

tableau10 or tableau:

  • 7
  • 1
  • 2
  • 4
  • 8
  • 9
  • 5
  • 10
  • 3
  • 6

google:

  • 7
  • 1
  • 2
  • 4
  • 8
  • 9
  • 5
  • 10
  • 3
  • 6
  • 12
  • 11

category20:

  • 1
  • 2
  • 4
  • 8
  • 16
  • 17
  • 9
  • 18
  • 5
  • 10
  • 20
  • 11
  • 3
  • 6
  • 12
  • 13
  • 7
  • 14
  • 19
  • 15

category20b:

  • 1
  • 2
  • 4
  • 8
  • 16
  • 17
  • 9
  • 18
  • 5
  • 10
  • 20
  • 11
  • 3
  • 6
  • 12
  • 13
  • 7
  • 14
  • 19
  • 15

category20c:

  • 1
  • 2
  • 4
  • 8
  • 16
  • 17
  • 9
  • 18
  • 5
  • 10
  • 20
  • 11
  • 3
  • 6
  • 12
  • 13
  • 7
  • 14
  • 19
  • 15

See also