Difference between revisions of "Template:Eye color"
(Created page with "<includeonly>{{#vardefine:preprocess |{{#switch:{{{1}}}|Heterochromic={{{1}}} |#default= {{#if:{{#switch: {{Str_rightc|{{{1}}}|1}} <!-- If the last word of "Eye color"...") |
m |
||
Line 41: | Line 41: | ||
| Pink | | Pink | ||
| Magenta | | Magenta | ||
− | | Peachblow = [[Category:Pink eyes]]{{#ifexist:Pink eyes|[[Pink eyes|{{#var:preprocess}}eyes]]|[[:Category:Pink eyes|{{#var:preprocess}}eyes]]}}<!-- Used #var:preprocess to preserve any and all possible prefixes --> | + | | Peachblow = [[Category:Pink eyes]]{{#ifexist:Pink eyes|[[Pink eyes|{{#var:preprocess}} eyes]]|[[:Category:Pink eyes|{{#var:preprocess}} eyes]]}}<!-- Used #var:preprocess to preserve any and all possible prefixes --> |
| Violet | | Violet | ||
| Red | | Red | ||
− | | Orange red = [[Category:Red eyes]]{{#ifexist:Red eyes|[[Red eyes|{{#var:preprocess}}eyes]]|[[:Category:Red eyes|{{#var:preprocess}}eyes]]}} | + | | Orange red = [[Category:Red eyes]]{{#ifexist:Red eyes|[[Red eyes|{{#var:preprocess}} eyes]]|[[:Category:Red eyes|{{#var:preprocess}} eyes]]}} |
| Purple | | Purple | ||
| Indigo | | Indigo | ||
| Bluish violet | | Bluish violet | ||
| Lilac | | Lilac | ||
− | | Mauve = [[Category:Purple eyes]]{{#ifexist:Purple eyes|[[Purple eyes|{{#var:preprocess}}eyes]]|[[:Category:Purple eyes|{{#var:preprocess}}eyes]]}} | + | | Mauve = [[Category:Purple eyes]]{{#ifexist:Purple eyes|[[Purple eyes|{{#var:preprocess}} eyes]]|[[:Category:Purple eyes|{{#var:preprocess}} eyes]]}} |
| Cyan | | Cyan | ||
| Blue | | Blue | ||
Line 55: | Line 55: | ||
| Bluish grey | Bluish gray | Grayish blue | Greyish blue | | Bluish grey | Bluish gray | Grayish blue | Greyish blue | ||
| Jewelry blue | | Jewelry blue | ||
− | | Sky blue = [[Category:Blue eyes]]{{#ifexist:Blue eyes|[[Blue eyes|{{#var:preprocess}}eyes]]|[[:Category:Blue eyes|{{#var:preprocess}}eyes]]}} | + | | Sky blue = [[Category:Blue eyes]]{{#ifexist:Blue eyes|[[Blue eyes|{{#var:preprocess}} eyes]]|[[:Category:Blue eyes|{{#var:preprocess}} eyes]]}} |
| Green | | Green | ||
| Dark green | | Dark green | ||
Line 63: | Line 63: | ||
| Jade | | Jade | ||
| Olivine | | Olivine | ||
− | | Celadon = [[Category:Green eyes]]{{#ifexist:Green eyes|[[Green eyes|{{#var:preprocess}}eyes]]|[[:Category:Green eyes|{{#var:preprocess}}eyes]]}} | + | | Celadon = [[Category:Green eyes]]{{#ifexist:Green eyes|[[Green eyes|{{#var:preprocess}} eyes]]|[[:Category:Green eyes|{{#var:preprocess}} eyes]]}} |
| Yellow | | Yellow | ||
| Golden | | Golden | ||
Line 69: | Line 69: | ||
| Gold | | Gold | ||
| Flax | Flaxen | | Flax | Flaxen | ||
− | | Amber = [[Category:Golden eyes]]{{#ifexist:Golden eyes|[[Golden eyes|{{#var:preprocess}}eyes]]|[[:Category:Golden eyes|{{#var:preprocess}}eyes]]}} | + | | Amber = [[Category:Golden eyes]]{{#ifexist:Golden eyes|[[Golden eyes|{{#var:preprocess}} eyes]]|[[:Category:Golden eyes|{{#var:preprocess}} eyes]]}} |
− | | Orange = [[Category:Orange eyes]]{{#ifexist:Orange eyes|[[Orange eyes|{{#var:preprocess}}eyes]]|[[:Category:Orange eyes|{{#var:preprocess}}eyes]]}} | + | | Orange = [[Category:Orange eyes]]{{#ifexist:Orange eyes|[[Orange eyes|{{#var:preprocess}} eyes]]|[[:Category:Orange eyes|{{#var:preprocess}} eyes]]}} |
| Earth | | Earth | ||
| Brown | | Brown | ||
Line 80: | Line 80: | ||
| Reddish brown | | Reddish brown | ||
| Golden brown | | Golden brown | ||
− | | Claret = [[Category:Brown eyes]]{{#ifexist:Brown eyes|[[Brown eyes|{{#var:preprocess}}eyes]]|[[:Category:Brown eyes|{{#var:preprocess}}eyes]]}} | + | | Claret = [[Category:Brown eyes]]{{#ifexist:Brown eyes|[[Brown eyes|{{#var:preprocess}} eyes]]|[[:Category:Brown eyes|{{#var:preprocess}} eyes]]}} |
| Black | | Black | ||
− | | Blue black = [[Category:Black eyes]][[:Category:Black eyes|{{#var:preprocess}}eyes]] | + | | Blue black = [[Category:Black eyes]][[:Category:Black eyes|{{#var:preprocess}} eyes]] |
| Grey | Gray | | Grey | Gray | ||
| Silver | | Silver | ||
| Silvery white | | Silvery white | ||
− | | Silvery grey | Silvery gray = [[Category:Gray eyes]]{{#ifexist:Gray eyes|[[Gray eyes|{{#var:preprocess}}eyes]]|[[:Category:Gray eyes|{{#var:preprocess}}eyes]]}} | + | | Silvery grey | Silvery gray = [[Category:Gray eyes]]{{#ifexist:Gray eyes|[[Gray eyes|{{#var:preprocess}} eyes]]|[[:Category:Gray eyes|{{#var:preprocess}} eyes]]}} |
− | | White = [[Category:White eyes]]{{#ifexist:White eyes|[[White eyes|{{#var:preprocess}}eyes]]|[[:Category:White eyes|{{#var:preprocess}}eyes]]}} | + | | White = [[Category:White eyes]]{{#ifexist:White eyes|[[White eyes|{{#var:preprocess}} eyes]]|[[:Category:White eyes|{{#var:preprocess}} eyes]]}} |
− | | Heterochromic = [[Category:Heterochromic eyes]]{{#ifexist:Heterochromic eyes|[[Heterochromic eyes|{{#var:preprocess}}eyes]]|[[:Category:Heterochromic eyes|{{#var:preprocess}}eyes]]}} | + | | Heterochromic = [[Category:Heterochromic eyes]]{{#ifexist:Heterochromic eyes|[[Heterochromic eyes|{{#var:preprocess}} eyes]]|[[:Category:Heterochromic eyes|{{#var:preprocess}} eyes]]}} |
− | | Rainbow = [[Category:Rainbow eyes]]{{#ifexist:Rainbow eyes|[[Rainbow eyes|{{#var:preprocess}}eyes]]|[[:Category:Rainbow eyes|{{#var:preprocess}}eyes]]}} | + | | Rainbow = [[Category:Rainbow eyes]]{{#ifexist:Rainbow eyes|[[Rainbow eyes|{{#var:preprocess}} eyes]]|[[:Category:Rainbow eyes|{{#var:preprocess}} eyes]]}} |
| #default = <!-- Error-margin program to accept "narrowly defined colors"--> | | #default = <!-- Error-margin program to accept "narrowly defined colors"--> | ||
{{#vardefine:lastchar | {{#vardefine:lastchar | ||
|{{Str_right|{{#var:preprocess}}|{{#expr:{{Str_len|{{#var:preprocess}}}}-1}} }} <!-- Takes the last character “x” --> | |{{Str_right|{{#var:preprocess}}|{{#expr:{{Str_len|{{#var:preprocess}}}}-1}} }} <!-- Takes the last character “x” --> | ||
}}{{#ifexist: Category:{{#var:lastchar}}eyes <!-- Detects whether the “x eyes” category exists --> | }}{{#ifexist: Category:{{#var:lastchar}}eyes <!-- Detects whether the “x eyes” category exists --> | ||
− | | [[{{#var:lastchar}}eyes|{{#var:preprocess}}eyes]][[Category:{{#var:lastchar}}eyes]] <!-- If so, it displays the category --> | + | | [[{{#var:lastchar}}eyes|{{#var:preprocess}} eyes]][[Category:{{#var:lastchar}}eyes]] <!-- If so, it displays the category --> |
| {{#var:preprocess}}eyes[[Category:Incorrect eye color]] <!-- Otherwise it returns “Incorrect eye color” --> | | {{#var:preprocess}}eyes[[Category:Incorrect eye color]] <!-- Otherwise it returns “Incorrect eye color” --> | ||
}} | }} | ||
}}</includeonly><noinclude>{{Doc}}</noinclude> | }}</includeonly><noinclude>{{Doc}}</noinclude> |
Latest revision as of 11:26, 26 August 2017
This template includes some very complex parameters and structures in its source code. This template has a complex structure. Please do not arbitrarily modify this template unless you are sure that you understand its use and details, and are capable of fixing all the changes entailing this edit. Please conduct all experimental steps in the sandbox or your own user page.Please refer to the discussion page before using. |
This template is used for eye-color related items on Galcharainfo-type templates.
Nearly entirely from {{Hair color}}
It is made to automatically recognize and correct incorrect eye colors. Articles with wrongly-entered eye colors can be found at Incorrect eye color.
The eye 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 |