வார்ப்புரு:Taxobox colour/doc
{{Documentation subpage}}
 {{High-risk|340000+}}
 &lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&gt;
 
 &lt;strong&gt;Note to template editors&lt;/strong&gt;: Edits to the taxonomic terms (taxa) used in this template must be reflected by {{tl|Autotaxobox colour}}, {{tl|Is reg()}}, and {{tl|Taxobox colour scheme}}. The colour-determining taxon must also be at a rank allowed to change the taxobox colour by {{tl|Taxobox}}, so this may need altering. Colours must be defined using the rgb(..,..,..) format to enable {{tl|Sets taxobox colour}} to work correctly.
 
 == Function ==
 This template generates the appropriate colour for a taxobox.
 
 It should only be used either by other taxobox templates or within a taxobox.
 
 === Use within a taxobox ===
 
 Both manual and automatic taxoboxes usually generate their colours automatically. If this fails, or if for some reason the automatically generated colour should be over-ridden, then this template can be used within a taxobox to set the colour based on a supplied taxon. Thus:
 &lt;pre&gt;| color = {{Taxobox colour|Animalia}}
 &lt;/pre&gt;
 within a taxobox forces its colour to be the one appropriate for animal taxoboxes. &lt;em&gt;Colours should not be declared directly in taxoboxes&lt;/em&gt;; using this template ensures that taxobox colours remain consistent.
 
 Examples:
 * &lt;code&gt;&lt;nowiki&gt;{{Taxobox colour|Animalia}}&lt;/nowiki&gt;&lt;/code&gt; → {{Taxobox colour|Animalia}}
 * &lt;code&gt;&lt;nowiki&gt;{{Taxobox colour|Felis}}&lt;/nowiki&gt;&lt;/code&gt; → {{Taxobox colour|Felis}}
 
 === Use by taxonomy templates ===
 
 Manual taxoboxes call this template from {{tl|Taxobox/core}}, using the format &lt;code&gt;&lt;nowiki&gt;{{&lt;/nowiki&gt;Taxobox colour|''taxon-name''}}&lt;/code&gt;. It returns the colour defined in the template for that taxon name, if there is one, or the error colour and styling if not.
 
 Automated taxoboxes call this template themselves, passing the colour obtained to {{tl|Taxobox/core}}. They use the format &lt;code&gt;&lt;nowiki&gt;{{&lt;/nowiki&gt;Taxobox colour|taxon=''taxon-name''}}&lt;/code&gt;. This format causes an upwards search in the taxonomic hierarchy specified by the taxonomy templates (templates with names like &quot;Template:Taxonomy/...&quot;) using {{tl|Is_reg()}} to decide whether a taxon can determine the colour of a taxobox. Thus it is essential that {{tl|Is_reg()}} is kept in step with this template.
 
 Examples:
 * &lt;code&gt;&lt;nowiki&gt;{{Taxobox colour|taxon=Animalia}}&lt;/nowiki&gt;&lt;/code&gt; → {{Taxobox colour|taxon=Animalia}}
 * &lt;code&gt;&lt;nowiki&gt;{{Taxobox colour|taxon=Felis}}&lt;/nowiki&gt;&lt;/code&gt; → {{Taxobox colour|taxon=Felis}}
 Notice the difference in behaviour between &lt;code&gt;&lt;nowiki&gt;{{Taxobox colour|Felis}}&lt;/nowiki&gt;&lt;/code&gt; and &lt;code&gt;&lt;nowiki&gt;{{Taxobox colour|taxon=Felis}}&lt;/nowiki&gt;&lt;/code&gt;.
 
 ==Taxobox colour scheme==
 {{Taxobox colour scheme}}
 
 == Supporting templates ==
 * [[Template:Get regnum()]]
 * [[Template:Taxobox/Error colour]]
 
 == Tracking category ==
 * [[:Category:Taxoboxes with an invalid color]]
 
 &lt;includeonly&gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 &lt;!-- Categories below this line, please; interwikis at Wikidata --&gt;
 [[Category:Taxobox templates]]
 [[Category:Template implementation details]]
 [[Category:Templates that add a tracking category]]