https://nordiclarp.org/w/index.php?title=Template:Color_contrast_conformance/doc&feed=atom&action=history
Template:Color contrast conformance/doc - Revision history
2024-03-29T01:04:35Z
Revision history for this page on the wiki
MediaWiki 1.34.2
https://nordiclarp.org/w/index.php?title=Template:Color_contrast_conformance/doc&diff=8503&oldid=prev
Johannes Axner: 1 revision imported
2018-12-29T15:29:38Z
<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 15:29, 29 December 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Johannes Axner
https://nordiclarp.org/w/index.php?title=Template:Color_contrast_conformance/doc&diff=8502&oldid=prev
en>Zyxw: note module and template used
2018-11-18T00:28:43Z
<p>note module and template used</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--><br />
{{Lua|Module:Color contrast}}<!-- via Template:Color contrast ratio --><br />
<br />
== Usage ==<br />
<br />
The '''[[Template:{{BASEPAGENAME}}]]''' gives a "AAA", "AA" or "none" judgment for the level of conformance to [[WCAG 2.0]] of two colors together, in terms of contrast ratio, where the colors can be either [[RGB color model|RGB]] <code>#numbers</code> (<code>#56F3BB</code>) or color names (<code>green</code>, <code>darkorange</code>, or <code>NavahoWhite</code>, etc.).<br />
<br />
{| class="wikitable"<br />
|-<br />
! Code !! Result<br />
|-<br />
| {{tlx|{{BASEPAGENAME}}|blue|white}} || {{{{BASEPAGENAME}}|blue|white}}<br />
|-<br />
| {{tlx|{{BASEPAGENAME}}|red|#FFcc00}} || {{{{BASEPAGENAME}}|red|#FFcc00}}<br />
|-<br />
| {{tlx|{{BASEPAGENAME}}|black|White|show{{=}}no}} || {{{{BASEPAGENAME}}|black|White|show=no}}<br />
|}<br />
<br />
Either parameter 1 or 2 can be a standard color name (in upper/lowercase letters) or an RGB <code>#number</code>, such as: <code>#FF45BB</code>. See: [[Web colors]], for a full list of color names and the assigned RGB <code>#number</code> values. The option "<code>show=no</code>" will suppress showing the color names or numbers, and give just the "AAA", "AA" or "none" answer.<br />
<br />
== HTML colors ==<br />
{| class="wikitable sortable"<br />
|+ Accessibility of pairs of HTML colors<br />
|-<br />
! !! {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call=Color sample}}<br />
|-<br />
| {{Color sample|black}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=black|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|navy}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=navy|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|maroon}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=maroon|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|purple}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=purple|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|blue}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=blue|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|green}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=green|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|teal}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=teal|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|olive}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=olive|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|red}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=red|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|gray}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=gray|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|fuchsia}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=fuchsia|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|orange}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=orange|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|silver}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=silver|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|lime}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=lime|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|aqua}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=aqua|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|yellow}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=yellow|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|-<br />
| {{Color sample|white}} || {{for loop| {{!!}} |white|yellow|aqua|lime|silver|orange|fuchsia|gray|red|olive|teal|green|blue|purple|maroon|navy|black|call={{BASEPAGENAME}}|pc1n=1|pc1v=white|pc2n=show|pc2v=no|pc3n=3|pc3v={{na}}|pv=2}}<br />
|}<br />
<br />
==Supporting template==<br />
* {{tl|Color contrast ratio}}, gives ratio number &mdash; uses {{m2|Color contrast|ratio}}<br />
<br />
==See also==<br />
* {{tl|ColorToLum}}, gives luminance value of a color<br />
* [[Wikipedia:WikiProject Accessibility]]<br />
<br />
==External links==<br />
* [http://trace.wisc.edu/contrast-ratio-examples/ Index of Color Contrast Samples]<br />
<br />
<includeonly><br />
<!--Categories below this line, please; interwikis at Wikidata--><br />
{{DEFAULTSORT:Color Contrast Visible}}<br />
[[Category:Color templates]]<br />
</includeonly></div>
en>Zyxw