Difference between revisions of "Template:Hair color"

From Moegirlpedia
Jump to: navigation, search
(暫時頁面,尚未校對.(the page which is still in edit))
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!-- Edit the manual after this line -->
+
<includeonly>{{#vardefine:preprocess
<includeonly>{{Category:Esoteric}}
+
  |{{#if:{{#switch: {{Str_rightc|{{{1}}}|1}} <!-- If the last word of "hair color" matches one of the following -->
----
+
          |hair
</includeonly>This mould is an assist mould which can help you choose hair color in "character's information" and all the other related mould.
+
          |color
 +
          = true }}
 +
    |{{Str_crop|{{{1}}}|1}} <!-- Then the last word is removed -->
 +
    |{{{1}}} <!-- Otherwise it is not -->
 +
  }}
 +
}}<!--
  
The purpose is to automatically detected and correct the wrong hair color. The incorrect hair color's can be found in [[: Category:the wrong hair color|the wrong hair color calcification]]
+
-->{{#vardefine:hair color
 +
  |{{#if:{{#switch: {{Str_left|{{#var:preprocess}}|1}} <!-- If the first word of “hair color”matches any of the following -->
 +
          |Light
 +
          |Dull
 +
          |Bright
 +
          |Dark
 +
          |Thick
 +
          |Thin
 +
          |Black
 +
          |Gray |Grey
 +
          |Silver
 +
          |Jade
 +
          = true }}
 +
    |{{#ifeq:{{Str_len|{{#var:preprocess}}}}
 +
      |1 <!-- And the length of “hair color” is longer than 1 word (to avoid cropping everything) -->
 +
      |{{#var:preprocess}}
 +
      |{{Str_crop_left|{{#var:preprocess}}|1}} <!-- Then the first word is cropped -->
 +
      }}
 +
    |{{#var:preprocess}} <!-- Otherwise it is not. -->
 +
  }}
 +
}}<!--
  
When we talk about the hair color, it usaually come to several types. Some common color should be auto return to the main color, if there are some secondary color which is usually appear, you can add it to the mould.
+
-->{{#switch: {{#var:hair color}}
 
+
| Pink
== currently color sheet ==
+
| Brownish-pink
 
+
| Magenta
{| class="wikitable" border="1"
+
| Peachblow = [[Category:Pink hair]][[Pink hair|{{#var:preprocess}} hair]]<!-- The aim of using #var:preprocess is to preserve all possible prefixes -->
|-
+
| Crimson
! classification  !! main color !! secondary color (assist color)
+
| Red
|-
+
| Blood |Blood red = [[Category:Red hair]][[Red hair|{{#var:preprocess}} hair]]
| Pink||{{colorbox|pink}}#FFC0CB||Magenta{{colorbox|#FF00FF}}#FF00FF
+
| Purple
|-
+
| Indigo
| Red||{{colorbox|red}}#FF0000||
+
| Lilac
|-
+
| Mauve | Purplish red = [[Category:Purple hair]][[Purple hair|{{#var:preprocess}} hair]]
| Purple||{{colorbox|#800080}}#800080||Indigo{{colorbox|#4B0080}}#4B0080
+
| Cyan
|-
+
| Blue
| Blue||{{colorbox|#0000FF}}#0000FF||Cyan{{colorbox|#00FFFF}}#00FFFF
+
| Sky blue = [[Category:Blue hair]][[Blue hair|{{#var:preprocess}} hair]]
|-
+
| Green
| Green||{{colorbox|#00FF00}}#00FF00||Kelly green{{colorbox|#9ACD32}}#9ACD32、Celadon(Pale green){{colorbox|#98FB98}}#98FB98、Dark green{{colorbox|#006400}}#006400
+
| Olivine
|-
+
| Celadon
| Blond||{{colorbox|#FFD700}}#FFD700||Yellow{{colorbox|#FFFF00}}#FFFF00、Linen{{colorbox|#FAF0E6}}#FAF0E6、Beige{{colorbox|#E3CCA9}}#E3CCA9
+
| Blackish green = [[Category:Green hair]][[Green hair|{{#var:preprocess}} hair]]
|-
+
| Golden
| Orange||{{colorbox|orange}}#FFA500||
+
| Blond
|-
+
| Yellow
| Brown(traditional)||{{colorbox|#964B00}}#964B00||Auburn{{colorbox|#A52A2A}}#A52A2A、Maroon{{colorbox|#800000}}#800000、Mandy{{colorbox|#852839}}#852839<br />Brown{{colorbox|#4D3900}}#4D3900、Dark brown{{colorbox|#654321}}#654321
+
| Gold
|-
+
| Beige
| Black||{{colorbox|#000000}}#000000 ||
+
| Cream
|-
+
| Flax | Flaxen = [[Category:Golden hair]][[Golden hair|{{#var:preprocess}} hair]]
| White/Grey||{{colorbox|#C0C0C0}}#C0C0C0||Gray{{colorbox|#808080}}#808080、White{{colorbox|#FFFFFF}}#FFFFFF
+
| Orange
|-
+
| Tangerine = [[Category:Orange hair]][[Orange hair|{{#var:preprocess}} hair]]
| Rainbow|| <div style="width: 75px;>{{linear-gradient|left|red, yellow, green, blue, purple|info=&nbsp;}}</div> ||
+
| Brown
|}
+
| Earth
<!-- After this line is the category of mould-->
+
| Reddish brown
<includeonly>[[Category:assist mould]]</includeonly>
+
| Maroon
<noinclude>[[Category:manual paper of mould]]</noinclude>
+
| Linen brown
 +
| Brownish black
 +
| Tawny
 +
| Khaki
 +
| Claret | Wine red = [[Category:Brown hair]][[Brown hair|{{#var:preprocess}} hair]]
 +
| Black
 +
| Blue-black | Black-blue = [[Category:Black hair]][[Black hair|{{#var:preprocess}} hair]]
 +
| White<!--      = [[Category:White hair]][[White hair|{{#var:preprocess}} hair]]-->
 +
| Grey
 +
| Silver
 +
| Silvery gray
 +
| Silvery white = [[Category:Silver hair]][[Silver hair|{{#var:preprocess}} hair]]
 +
| Rainbow        = [[Category:Rainbow hair]][[Rainbow hair|{{#var:preprocess}} hair]]
 +
| Dual          = [[Category:Dual-color hair]][[Dual-color hair|{{#var:preprocess}} hair]]
 +
| Mixed
 +
| Mixed-color        = [[Category:Mixed-color hair]][[Mixed-color hair|{{#var:preprocess}} hair]]
 +
| #default    = <!-- Error-margin line, to accept "very narrowly-defined colors":
 +
-->{{#vardefine:lastchar
 +
|{{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 -->
 +
  | [[{{#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” -->
 +
  }}
 +
}}</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