Template:Color number

From Wikimedia Commons, the free media repository
Jump to: navigation, search

[[Category:{{{1}}} numbers|{{{2}}}]][[Category:Number {{{2}}} by color]]


Template:Color number is to be added to categories with media of numbers of a particular color (e.g. Category:White number 000). It uses WikiData to get color information and display a header, and categorizes by color and number.


{{Color number|1|2|rimage}}
  • 1 - color
  • 2 - number
  • rimage - (optional) image to display on right side of box


for layout, see Template:Color number/data and Template:Color number/layout
  • The following parameters are passed to data:
    • 1 - color QID
    • 2 - color category name
    • 3 - number
    • lang - language code from autotranslate
    • rimage - image name from page
  • The following parameters are gathered by data and passed to layout:
    • clabel - color WD label
    • ccat - color category name
    • cimage - color image (WD) (P18)
    • crgb - sRGB color hex triplet (WD) (P465)
    • n - number
    • lang - language code to use in WD queries
    • rimage - directly passed from page


Use the following template for new language templates (e.g. Template:Color number/en):

<includeonly>{{Color number/data|{{{1}}}|{{{2}}}|{{{3}}}|lang=<!--
Insert desired language code here -->  <!--
(comment code may be removed if desired)
{{translated tag|header}}
</no include>