ထာမ်ပလိက်:Greater color contrast ratio/doc
This is a documentation subpage for ထာမ်ပလိက်:Greater color contrast ratio. It contains usage information, categories and other content that is not part of the original ထာမ်ပလိက် page. |
ထာမ်ပလိက်တဏအ်ဝွံမရပ်စပ်သုၚ်စောဲမတော်ခယျၜိုတ် မုက်လိက် ၊ သီုအရာ ≈940% ဆေၚ်စပ်ကဵုသီုဖအိုတ် မုက်လိက်ဟေၚ်၊ ဟိုတ်ဂှ်ရပရေၚ်မပြံၚ်လှာဲဒှ်လလောၚ်တရးသၠဲလးရ။ သ္ပဂုန်တုဲမစမ်ရံၚ်ပရေၚ်အပြံၚ်အလှာဲပ္ဍဲမဆေၚ်စပ်ကဵုထာမ်ပလိက် /sandbox ဝါ /testcases မုက်လိက်တန်ဍောတ်၊ ဝါ ပ္ဍဲမုက်လိက်တန်ဍောတ်ညးလွပ်ဒြပ်ဇကု။ သ္ပဂုန်တုဲစၚ်ခြၚ်ချပ်ဗ္စာရဏာသဳကၠဳပရေၚ်ဂွံပြံၚ်လှာဲလ္တူဆေၚ်စပ်ကဵုရပ်စပ်စကာညးလွပ် ဓရီုကျာညိကၠာ။ |
This template uses Lua: |
This template determines the pair of colors with the larger contrast ratio: color1/color2 or color1/color3. This is useful for selecting a foreground/background color pair. For accessibility, WCAG 2.0 AA guidelines require a contrast ratio of 3 or larger for large text, and 4.5 or larger for normal sized text. When used in the default mode, with color2 and color3 equal to white and black, the selected color pair will always have a contrast ratio greater than 4.58.
Examples
ပလေဝ်ဒါန်<span style="background:navy; color:{{Greater color contrast ratio|navy|white|black}}">Navy</span>
→ Navy<span style="{{Greater color contrast ratio|navy|white|black|css=y}}">Navy</span>
→ Navy<span style="{{Greater color contrast ratio|navy|css=y}}">Navy</span>
→ Navy<span style="background:red; color:{{Greater color contrast ratio|red|white|black}}">Red</span>
→ Red<span style="{{Greater color contrast ratio|red|white|black|css=y}}">Red</span>
→ Red<span style="{{Greater color contrast ratio|red|css=y}}">Red</span>
→ Red<span style="background:white; color:{{Greater color contrast ratio|white|white|black}}">White</span>
→ White<span style="{{Greater color contrast ratio|white|white|black|css=y}}">White</span>
→ White<span style="background:black; color:{{Greater color contrast ratio|black|white|black}}">Black</span>
→ Black<span style="{{Greater color contrast ratio|black|white|black|css=y}}">Black</span>
→ Black<span style="background:#005500; color:{{Greater color contrast ratio|#005500|#FFFFFF|#000000}}">#005500</span>
→ #005500<span style="{{Greater color contrast ratio|#005500|#FFFFFF|#000000|css=y}}">#005500</span>
→ #005500<span style="background:#005500; color:#{{Greater color contrast ratio|005500|FFFFFF|000000}}">005500</span>
→ 005500<span style="{{Greater color contrast ratio|005500|FFFFFF|000000}}">005500</span>
→ 005500<span style="background:#CC5500; color:#{{Greater color contrast ratio|CC5500|FFFFFF|000000}}">CC5500</span>
→ CC5500<span style="{{Greater color contrast ratio|CC5500|FFFFFF|000000|css=y}}">CC5500</span>
→ CC5500<span style="background:#CC5500; color:#{{Greater color contrast ratio|CC5500|FFFFFF|000000|bias=1}}">CC5500</span>
→ CC5500<span style="{{Greater color contrast ratio|CC5500|FFFFFF|000000|bias=1|css=y}}">CC5500</span>
→ CC5500<span style="background:Not a color; color:#{{Greater color contrast ratio|Not a color|FFFFFF|000000}}">Not a color</span>
→ Not a color<span style="{{Greater color contrast ratio|Not a color|FFFFFF|000000|css=y}}">Not a color</span>
→ Not a color
Optional parameters
ပလေဝ်ဒါန်The bias
parameter should be used with caution to ensure accessibility. As stated above, when used without a bias, and with color2 and color3 equal to white and black, the selected color pair will always have a contrast ratio greater than 4.58. A bias of 1.25, reduces the possible minimum to 4.0, which may not meet accessibility standards.
See also
ပလေဝ်ဒါန်- {{Ensure AAA contrast ratio}}
- {{Ensure AA contrast ratio}}
- Template:Color contrast conformance § HTML colors
- Wikipedia:Manual of Style/Accessibility § Color