Module:Color/doc: Difference between revisions

Created page with "This module implements {{T|Color}}."
 
Kuhlau (talk | contribs)
No edit summary
Line 1: Line 1:
This module implements {{T|Color}}.
This module implements {{T|Color}}.
==How to Update==
# Visit [[MediaWiki:Gadget-Colors.css]]. Here are the instructions on how to add colors:
#* If you have multiple (or you have one and you're not sure of the format), you can use [https://regex101.com/r/ggG9d6/2/list-substitution this link] to generate the code (type your color names in the big thing at the top, where it says "test string", each on a new line. Then, copy the result from the bottom.)
#* Replace <code>#hexcode</code> with your hex code(s).
#* Check whether the colors will look good on light or dark mode using [https://webaim.org/resources/contrastchecker/ WebAIM's Contrast Checker]. Currently, our light mode background color is <code>#fff</code> and our dark mode background color is <code>#111a20</code>. If the colors fail multiple checks on one mode, try tweaking it.
#* You have to add the light mode colors to the light mode block (starts at the top) and the dark mode colors to the dark mode block (starts around line 100).
#* Now add your colors to the block starting around line 260 titled <code><nowiki>/* [[Template:Color]] */</nowiki></code>. Use [https://regex101.com/r/ggG9d6/1/substitution this] to generate the code (or hit Substitution on the left sidebar of the previous link you used).
# In this module, update <code>local colors</code> table starting at line 7 with your new color(s). ([https://regex101.com/r/T2PPB2/1/list-substitution here you go])