What fresh hell is THIS now? - Patrick Lauke
So the calculations suggest:
var R = RsRGB <= 0.03928 ? RsRGB / 12.92 : Math.pow((RsRGB + 0.055) / 1.055, 2.4);
Would R
be considered the relative luminence of just red?
R
calculation was. I presume it is the relative luminance of R.
L = 0.2126 * R + 0.7152 * G + 0.0722 * B
would then be the relative luminence of the whole color.
Press <kbd>VO + Right Arrow</kbd> to read contents.
under interaction.
{ score: 'AAA' }
, { compliance: 'AAA' }
, and { aaa: true }
, and I’m open to other options to consider.
{isItWorthIt: true}
?
compliance : 'AAA'
seems most readable to me
Error: 'compliance' option should be one of ['A','AA','AAA']
A
var compliance = { A: 1, AA: 2, AAA: 3, }; function getCompliance (level) { if (level === null || level === undefined) { return compliance.A; } if (level in Object.keys(compliance)) { return compliance[level]; } throw new Error('compliance option should be one of...) }
.chat-item.deleted .chat-item__container { opacity: .5; }
compliance: 'AAA'
and compliance: 'AA'
are still the most readable options? I just don’t want to confuse people into thinking compliance: 'A'
does something.
AA
and AAA
, possibly elaborating on the exclusion of A
in //comments
or README
font: 600 14pt "Open Sans"
be evaluated as bold or normal? W3 lists common correspondance of non normal/bold weights.
>= 500
or >= 600
versus >= 700
. (and I’m aware that technically 100-900 are keywords and not actual numbers)
@jonathantneal: Depending on how your users use the tool, you could have coercion in your compliance levels. Say you have an 'overall' compliance level you want to reach of A
, but as you say, contrast has only AA
and AAA
. Depending on your tool, you could coerce into the nearest level to A
, which would be AAA
and
warning: compliance level 'A' unavailable for 'font contrast', available levels: ['AA', 'AAA'], coercing to 'AA'.
A
=> AA
, is what I meant.
AA
, so the user gets what they want, while still conforming to WCAG.