r1 vs r2
1
{{{#!wiki style="display:inline-block; padding:8px 12px; border:1px solid #888; color:@fg@; background:@bg@;"
2
'''샘플 스트''' Aa 가나다 123
1
{{{#!wiki style="display:inline-block; min-width:260px; border:1px solid #999; border-radius:6px; padding:10px; background:@bg@; color:@fg@;"
2
'''대비 스트 샘플'''[br]
3
Aa 가나다 123
34
}}}
45
5
{{{#!if (function(f,b){function v(c,i){return parseInt(c.substr(i,2),16)/255}function l(x){return x<=0.04045?x/12.92:Math.pow((x+0.055)/1.055,2.4)}function y(c){c=c.replace('#','');return 0.2126*l(v(c,0))+0.7152*l(v(c,2))+0.0722*l(v(c,4))}var a=y(f),d=y(b),hi=a>d?a:d,lo=a>d?d:a;return (hi+0.05)/(lo+0.05)>=4.5})(fg,bg)
6
'''AA 일반 텍스트 기준 통과'''
6
||<tablewidth=100%><tablebgcolor=#ffffff,#1f1f1f><tablecolor=#222,#eee> 글자색 || {{{@fg@}}} ||
7
|| 배경색 || {{{@bg@}}} ||
8
|| 기준 대비비 || {{{@기준@}}}:1 ||
9
10
{{{#!if (function(f,b,t){function n(c){c=String(c).trim();if(c.charAt(0)=='#')c=c.substr(1);if(c.length==3)c=c.charAt(0)+c.charAt(0)+c.charAt(1)+c.charAt(1)+c.charAt(2)+c.charAt(2);return c;}function v(c,i){return parseInt(c.substr(i,2),16)/255;}function l(x){return x<=0.04045?x/12.92:Math.pow((x+0.055)/1.055,2.4);}function y(c){c=n(c);return 0.2126*l(v(c,0))+0.7152*l(v(c,2))+0.0722*l(v(c,4));}var a=y(f),d=y(b),hi=a>d?a:d,lo=a>d?d:a;return ((hi+0.05)/(lo+0.05))>=Number(t);})('@fg@','@bg@',@기준@)
11
{{{#!wiki style="margin-top:6px; padding:6px 8px; border-left:4px solid #2ecc71; background:#eafaf1; color:#145a32;"
12
'''통과''' 입력한 기준 대비비 이상입니다.
713
}}}
14
}}}
815
9
{{{#!if !(function(f,b){function v(c,i){return parseInt(c.substr(i,2),16)/255}function l(x){return x<=0.04045?x/12.92:Math.pow((x+0.055)/1.055,2.4)}function y(c){c=c.replace('#','');return 0.2126*l(v(c,0))+0.7152*l(v(c,2))+0.0722*l(v(c,4))}var a=y(f),d=y(b),hi=a>d?a:d,lo=a>d?d:a;return (hi+0.05)/(lo+0.05)>=4.5})(fg,bg)
10
'''AA 일반 텍스트 기준 미달'''
16
{{{#!if !((function(f,b,t){function n(c){c=String(c).trim();if(c.charAt(0)=='#')c=c.substr(1);if(c.length==3)c=c.charAt(0)+c.charAt(0)+c.charAt(1)+c.charAt(1)+c.charAt(2)+c.charAt(2);return c;}function v(c,i){return parseInt(c.substr(i,2),16)/255;}function l(x){return x<=0.04045?x/12.92:Math.pow((x+0.055)/1.055,2.4);}function y(c){c=n(c);return 0.2126*l(v(c,0))+0.7152*l(v(c,2))+0.0722*l(v(c,4));}var a=y(f),d=y(b),hi=a>d?a:d,lo=a>d?d:a;return ((hi+0.05)/(lo+0.05))>=Number(t);})('@fg@','@bg@',@기준@))
17
{{{#!wiki style="margin-top:6px; padding:6px 8px; border-left:4px solid #e74c3c; background:#fdedec; color:#78281f;"
18
'''미달''' 입력한 기준 대비비보다 낮습니다.
1119
}}}
20
}}}