Template:Colored list/doc
Jump to navigation
Jump to search
This is a documentation subpage for Template:Colored list. It contains usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
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}}
|
|
{{Colored list|One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|pre=#}}
|
|
{{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}}
|
|
{{Colored list|One|Two|class=plainlist}}
|
|
{{Colored list|1=1+1=2|2=2+2=4}} -or-{{Colored list|1+1{{=}}2|2+2{{=}}4}}
|
|
Color sequences
The following color sequences are available, mostly taken from the D3 3.x API and colorbrewer:
- 7
- 1
- 2
- 4
- 8
- 5
- 3
- 6
calc
:
- 7
- 1
- 2
- 4
- 8
- 5
- 3
- 6
- 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
- 7
- 1
- 2
- 4
- 8
- 9
- 5
- 10
- 3
- 6
- 12
- 11
- 1
- 2
- 4
- 8
- 16
- 17
- 9
- 18
- 5
- 10
- 20
- 11
- 3
- 6
- 12
- 13
- 7
- 14
- 19
- 15
- 1
- 2
- 4
- 8
- 16
- 17
- 9
- 18
- 5
- 10
- 20
- 11
- 3
- 6
- 12
- 13
- 7
- 14
- 19
- 15
- 1
- 2
- 4
- 8
- 16
- 17
- 9
- 18
- 5
- 10
- 20
- 11
- 3
- 6
- 12
- 13
- 7
- 14
- 19
- 15
See also