Jump to content

Template:Greater color contrast ratio/doc: Difference between revisions

Dat Hack3r (talk | contribs)
m Added {{Lua}}
Dat Hack3r (talk | contribs)
m Update to latest version of WCAG guidelines
 
Line 1: Line 1:
{{Lua|Module:Color contrast}}
{{Lua|Module:Color contrast}}
{{Tlx|Greater color contrast ratio}} determines which of two colors has more contrast relative to a given color. This is useful for selecting a foreground/background color pair. By default, the two candidate colors are white and black, and the selected color pair will always have a contrast ratio greater than 4.58. [http://www.w3.org/TR/WCAG20/#visual-audio-contrast WCAG 2.0 AA guidelines] require a contrast ratio of at least 3 for large text and at least 4.5 for normal sized text. Colors can be specified by name (e.g., <code>royalblue</code>) or as hex triplets, with or without the <code>#</code> prefix (e.g., <code>#4169e1</code>, <code>4169e1</code>).
{{Tlx|Greater color contrast ratio}} determines which of two colors has more contrast relative to a given color. This is useful for selecting a foreground/background color pair. By default, the two candidate colors are white and black, and the selected color pair will always have a contrast ratio greater than 4.58. [http://www.w3.org/TR/WCAG22/#contrast-minimum WCAG 2.2 AA guidelines] require a contrast ratio of at least 3 for large text and at least 4.5 for normal sized text. Colors can be specified by name (e.g., <code>royalblue</code>) or as hex triplets, with or without the <code>#</code> prefix (e.g., <code>#4169e1</code>, <code>4169e1</code>).


* {{tlx|Greater color contrast ratio|royalblue}} →
* {{tlx|Greater color contrast ratio|royalblue}} →