Difference between revisions of "Template:Class/colour"

From blackwiki
Jump to navigation Jump to search
test>PC78
(+doc)
test>Happy-melon
(almost impossible to use this in a template without the hashes as the syntax is inconsistent: you'd need to add them for the hex codes but *not* for the "transparent" ones)
Line 1: Line 1:
 
<includeonly>{{#switch:{{lc:{{{1|}}}}}
 
<includeonly>{{#switch:{{lc:{{{1|}}}}}
  | fa          = 6699ff
+
  | fa          = #6699ff
  | fl          = 6699ff
+
  | fl          = #6699ff
  | a            = 66ffff
+
  | a            = #66ffff
  | ga          = 66ff66
+
  | ga          = #66ff66
  | b            = b2ff66
+
  | b            = #b2ff66
  | c            = ffff66
+
  | c            = #ffff66
  | start        = ffaa66
+
  | start        = #ffaa66
  | stub        = ff6666
+
  | stub        = #ff6666
  | list        = aa88ff
+
  | list        = #aa88ff
  | na          = f5f5f5<!-- whitesmoke -->
+
  | na          = #f5f5f5<!-- whitesmoke -->
  | category|cat = ffa500<!-- orange -->
+
  | category|cat = #ffa500<!-- orange -->
  | current      = d462ff
+
  | current      = #d462ff
  | disambig|dab = 00fa9a<!-- mediumspringgreen -->
+
  | disambig|dab = #00fa9a<!-- mediumspringgreen -->
  | file|image  = ddccff
+
  | file|image  = #ddccff
  | future      = 8a95c9
+
  | future      = #8a95c9
  | merge        = 40acf8
+
  | merge        = #40acf8
  | needed      = dcdcdc
+
  | needed      = #dcdcdc
  | portal      = 808080
+
  | portal      = #808080
  | project      = c0c090
+
  | project      = #c0c090
  | redirect    = c0c0c0
+
  | redirect    = #c0c0c0
  | template    = ffccff
+
  | template    = #ffccff
  | bpluss|b+    = 66ff66
+
  | bpluss|b+    = #66ff66
  | sl          = ff6666
+
  | sl          = #ff6666
 
  | unassessed  = transparent
 
  | unassessed  = transparent
 
  | #default    = transparent
 
  | #default    = transparent

Revision as of 17:08, 5 April 2009

Template documentation[view] [edit] [history] [purge]

This template uses a single unnamed parameter to output the colour used by each class type as a six digit hex code prefixed with a # symbol.

Syntax Output Colour Syntax Output Colour
{{class/colour|FA}}
  1. 6699ff
style="background:
  1. 6699ff"|
{{class/colour|Book}} transparent
{{class/colour|FL}}
  1. 6699ff
style="background:
  1. 6699ff"|
{{class/colour|Category}}
  1. ffa500
style="background:
  1. ffa500"|
{{class/colour|FM}} transparent {{class/colour|Current}}
  1. d462ff
style="background:
  1. d462ff"|
{{class/colour|FPo}} transparent {{class/colour|Deferred}} transparent
{{class/colour|A}}
  1. 66ffff
style="background:
  1. 66ffff"|
{{class/colour|Disambig}}
  1. 00fa9a
style="background:
  1. 00fa9a"|
{{class/colour|AL}} transparent {{class/colour|Draft}} transparent
{{class/colour|GA}}
  1. 66ff66
style="background:
  1. 66ff66"|
{{class/colour|File}}
  1. ddccff
style="background:
  1. ddccff"|
{{class/colour|B}}
  1. b2ff66
style="background:
  1. b2ff66"|
{{class/colour|Audio}} transparent
{{class/colour|BL}} transparent {{class/colour|Future}}
  1. 8a95c9
style="background:
  1. 8a95c9"|
{{class/colour|Complete}} transparent {{class/colour|Merge}}
  1. 40acf8
style="background:
  1. 40acf8"|
{{class/colour|C}}
  1. ffff66
style="background:
  1. ffff66"|
{{class/colour|Needed}}
  1. dcdcdc
style="background:
  1. dcdcdc"|
{{class/colour|CL}} transparent {{class/colour|Portal}}
  1. 808080
style="background:
  1. 808080"|
{{class/colour|Substantial}} transparent {{class/colour|Meta}} transparent
{{class/colour|Start}}
  1. ffaa66
style="background:
  1. ffaa66"|
{{class/colour|Project}}
  1. c0c090
style="background:
  1. c0c090"|
{{class/colour|Basic}} transparent {{class/colour|Redirect}}
  1. c0c0c0
style="background:
  1. c0c0c0"|
{{class/colour|Stub}}
  1. ff6666
style="background:
  1. ff6666"|
{{class/colour|SIA}} transparent
{{class/colour|SL}}
  1. ff6666
style="background:
  1. ff6666"|
{{class/colour|Template}}
  1. ffccff
style="background:
  1. ffccff"|
{{class/colour|Incomplete}} transparent {{class/colour|User}} transparent
{{class/colour|List}}
  1. aa88ff
style="background:
  1. aa88ff"|
{{class/colour|Unassessed}} transparent
{{class/colour|NA}}
  1. f5f5f5
style="background:
  1. f5f5f5"|

Accessibility

To accommodate readers of Wikipedia who are partially or fully color-blind or visually impaired, the contrast of the text with its background colour should reach at least Web Content Accessibility Guidelines (WCAG) 2.0's AA level; see MOS:CONTRAST for further details. Class colours are typically used with blue linked text which uses colour #0645AD. You can check contrast levels with the following online tool: WebAIM Contrast Checker

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Class

This template uses a single unnamed parameter to output the colour used by each class type as a six digit hex code prefixed with a # symbol

Template parameters

ParameterDescriptionTypeStatus
Class type1

One of FA, FL, FM, A, GA, B, C, Start, Stub, List, NA, Category, Current, Disambig, Audio, File, Future, Merge, Needed, Portal, Project, Redirect, Template, Book, Deferred, SL, Unassessed, or User

Stringoptional

See also

Standard class types
{{class|FA}} {{class|FL}} {{class|FM}} {{class|A}}
{{class|GA}} {{class|B}} {{class|C}} {{class|Start}}
{{class|Stub}} {{class|List}} {{class|NA}} {{class|Unassessed}}
Non-standard class types
{{class|Current}} {{class|Future}} {{class|SIA}} {{class|Deferred}}
{{class|AL}} {{class|BL}} {{class|CL}} {{class|SL}}
{{class|Book}} {{class|Category}} {{class|Disambig}} {{class|Draft}}
{{class|File}} {{class|Merge}} {{class|Needed}} {{class|Portal}}
{{class|Project}} {{class|Redirect}} {{class|Template}} {{class|User}}
Importance types
 Top   High   Mid   Low 
{{importance|Top}} {{importance|High}} {{importance|Mid}} {{importance|Low}}
 Bottom   NA   ??? 
{{importance|Bottom}} {{importance|NA}} {{importance|Unknown}}
Class
Importance
Hybrid
Others
Tool to add multiple templates to quality assessment pages