Difference between revisions of "Template:Hair color"

From Moegirlpedia
Jump to: navigation, search
(Port from zhmgp)
m
 
(One intermediate revision by the same user not shown)
Line 35: Line 35:
 
| Brownish-pink
 
| Brownish-pink
 
| Magenta
 
| Magenta
| Peachblow = [[Category:Pink hair]][[Pink hair|{{#var:preprocess}}hair]]<!-- The aim of using #var:preprocess is to preserve all possible prefixes -->
+
| Peachblow = [[Category:Pink hair]][[Pink hair|{{#var:preprocess}} hair]]<!-- The aim of using #var:preprocess is to preserve all possible prefixes -->
 
| Crimson
 
| Crimson
 
| Red
 
| Red
| Blood |Blood red = [[Category:Red hair]][[Red hair|{{#var:preprocess}}hair]]
+
| Blood |Blood red = [[Category:Red hair]][[Red hair|{{#var:preprocess}} hair]]
 
| Purple
 
| Purple
 
| Indigo
 
| Indigo
 
| Lilac
 
| Lilac
| Mauve | Purplish red = [[Category:Purple hair]][[Purple hair|{{#var:preprocess}}hair]]
+
| Mauve | Purplish red = [[Category:Purple hair]][[Purple hair|{{#var:preprocess}} hair]]
 
| Cyan
 
| Cyan
 
| Blue
 
| Blue
| Sky blue = [[Category:Blue hair]][[Blue hair|{{#var:preprocess}}hair]]
+
| Sky blue = [[Category:Blue hair]][[Blue hair|{{#var:preprocess}} hair]]
 
| Green
 
| Green
 
| Olivine
 
| Olivine
 
| Celadon
 
| Celadon
| Blackish green = [[Category:绿发]][[绿发|{{#var:preprocess}}]]
+
| Blackish green = [[Category:Green hair]][[Green hair|{{#var:preprocess}} hair]]
 
| Golden
 
| Golden
 +
| Blond
 
| Yellow
 
| Yellow
 
| Gold
 
| Gold
 
| Beige
 
| Beige
 
| Cream
 
| Cream
| Flax | Flaxen = [[Category:Golden hair]][[Golden hair|{{#var:preprocess}}hair]]
+
| Flax | Flaxen = [[Category:Golden hair]][[Golden hair|{{#var:preprocess}} hair]]
 
| Orange
 
| Orange
| Tangerine = [[Category:Orange hair]][[Orange hair|{{#var:preprocess}}hair]]
+
| Tangerine = [[Category:Orange hair]][[Orange hair|{{#var:preprocess}} hair]]
 
| Brown
 
| Brown
 
| Earth
 
| Earth
Line 66: Line 67:
 
| Tawny
 
| Tawny
 
| Khaki
 
| Khaki
| Claret | Wine red = [[Category:Brown hair]][[Brown hair|{{#var:preprocess}}hair]]
+
| Claret | Wine red = [[Category:Brown hair]][[Brown hair|{{#var:preprocess}} hair]]
 
| Black
 
| Black
| Blue-black | Black-blue = [[Category:Black hair]][[Black hair|{{#var:preprocess}}hair]]
+
| Blue-black | Black-blue = [[Category:Black hair]][[Black hair|{{#var:preprocess}} hair]]
| White<!--      = [[Category:White hair]][[White hair|{{#var:preprocess}}hair]]-->
+
| White<!--      = [[Category:White hair]][[White hair|{{#var:preprocess}} hair]]-->
 
| Grey
 
| Grey
 
| Silver
 
| Silver
 
| Silvery gray
 
| Silvery gray
| Silvery white = [[Category:Silver hair]][[Silver hair|{{#var:preprocess}}hair]]
+
| Silvery white = [[Category:Silver hair]][[Silver hair|{{#var:preprocess}} hair]]
| Rainbow        = [[Category:Rainbow hair]][[Rainbow hair|{{#var:preprocess}}hair]]
+
| Rainbow        = [[Category:Rainbow hair]][[Rainbow hair|{{#var:preprocess}} hair]]
| Dual          = [[Category:Dual-color hair]][[Dual-color hair|{{#var:preprocess}}hair]]
+
| Dual          = [[Category:Dual-color hair]][[Dual-color hair|{{#var:preprocess}} hair]]
 
| Mixed
 
| Mixed
| Mixed-color        = [[Category:Mixed-color hair]][[Mixed-color hair|{{#var:preprocess}}hair]]
+
| Mixed-color        = [[Category:Mixed-color hair]][[Mixed-color hair|{{#var:preprocess}} hair]]
 
| #default    = <!-- Error-margin line, to accept "very narrowly-defined colors":
 
| #default    = <!-- Error-margin line, to accept "very narrowly-defined colors":
 
-->{{#vardefine:lastchar
 
-->{{#vardefine:lastchar
 
|{{Str_right|{{#var:preprocess}}|{{#expr:{{Str_len|{{#var:preprocess}}}}-1}} }} <!-- Takes the last character of the string "x" -->
 
|{{Str_right|{{#var:preprocess}}|{{#expr:{{Str_len|{{#var:preprocess}}}}-1}} }} <!-- Takes the last character of the string "x" -->
 
}}{{#ifexist: Category:{{#var:lastchar}}hair <!-- Detects whether "x hair" exists -->
 
}}{{#ifexist: Category:{{#var:lastchar}}hair <!-- Detects whether "x hair" exists -->
   | [[{{#var:lastchar}}hair|{{#var:preprocess}}hair]][[Category:{{#var:lastchar}}hair]] <!-- If there is a[[Category:x hair]], then it is displayed -->
+
   | [[{{#var:lastchar}}hair|{{#var:preprocess}} hair]][[Category:{{#var:lastchar}}hair]] <!-- If there is a[[Category:x hair]], then it is displayed -->
   | {{#var:preprocess}}hair[[Category:Incorrect hair color]] <!-- If not, it returns “Incorrect hair color” -->
+
   | {{#var:preprocess}} hair[[Category:Incorrect hair color]] <!-- If not, it returns “Incorrect hair color” -->
 
   }}
 
   }}
 
}}</includeonly><noinclude>{{Documentation}}[[Category:Auxiliary templates]]</noinclude>
 
}}</includeonly><noinclude>{{Documentation}}[[Category:Auxiliary templates]]</noinclude>

Latest revision as of 11:32, 26 August 2017

Template-info.svg Template Documentation  [View] [Edit] [History] [Refresh]

This template is used for hair-color related items on Galcharainfo-type templates.

It is made to automatically recognize and correct incorrect hair colors. Articles with wrongly-entered hair colors can be found at Incorrect hair color.

The hair colors mentioned here are divided into main types, with common derivatives automatically allocated to the main one. If some commonly-appearing secondary colors exist, they can be added into the template.

Current table of Colors

Category Primary Secondary
Pink #FFC0CB Magenta #FF00FF
Red #FF0000
Purple #800080 Indigo #4B0080
Blue #0000FF Cyan #00FFFF
Green #00FF00 Yellowish Green #9ACD32, Celadon(Pale Green) #98FB98, Dark Green #006400
Blond #FFD700 Yellow #FFFF00, Flax/Flaxen #FAF0E6, Beige #E3CCA9
Orange #FFA500
Earth #964B00 Brown #A52A2A, Maroon #800000, Claret #852839
Coffee #4D3900, Tawny #654321
Black #000000
Silver #C0C0C0 Grey #808080, White #FFFFFF
Rainbow