Re: measuring contrast ratio and Windows Clear Type

Hi Jim,

I do think there are some unknowns about how to accurately determine
what is enough contrast in a given situation. There are times I've
zoomed in on a font that appeared to be light blue, but when I looked
at the pixel level there wasn't a single light blue pixel in there. It
was just a composite of lots of different colors to produce the light
blue effect. This has been especially true when a thin font is
anti-aliased with a colored background and none of the involved colors
are a pure white or pure black. So at the end of the day, I'm not sure
how to accurately determine on a pixel-by-pixel basis how a accessible
a font color like this is.

I originally developed the tool to deal with text over top of CSS3
gradients, images, or any type of background that wasn't a single
color. It also happens that if a font has an anti-aliased edge, the
algorithm can give you some useful information as long as the font is
thick enough that there is a "core" part of the font that is basically
a consistent color.

Just a note, for the pixel comparison calculations, it does use the
formulas in WCAG 2.

Greg

--
Greg Kraus
University IT Accessibility Coordinator
NC State University
919.513.4087
gdkraus@ncsu.edu
http://go.ncsu.edu/itaccess



On Mon, Aug 11, 2014 at 9:45 AM, Jim Tobias <tobias@inclusive.com> wrote:
> Very interesting, Greg -- thanks for making that tool.
>
> I'm not a vision scientist, but something tells me we need their input to make sure that our tools reflect that actual user needs. I think a vision scientist was involved in the original contrast algorithm, and maybe we're ready for a second pass, that looks at how low vision works above the pixel and multi-pixel level.
>
> ***
> Jim Tobias
> Inclusive Technologies
> +1.908.907.2387 v/sms
> skype jimtobias
>
>
>> -----Original Message-----
>> From: Greg Kraus [mailto:greg_kraus@ncsu.edu]
>> Sent: Monday, August 11, 2014 8:11 AM
>> To: w3c-wai-ig@w3.org
>> Subject: Re: measuring contrast ratio and Windows Clear Type
>>
>> I developed a tool to deal with issues like this. It's a Chrome
>> extension called Color Contrast Analyzer.
>>
>> https://chrome.google.com/webstore/detail/color-contrast-analyzer/dagdlcijhfbmgkjokkjicnnfimlebcll?hl=en
>>
>> It takes a screen shot and compares a pixel with every pixel around
>> it. You can set how wide of a radius you want to search around each
>> pixel in order to deal with issues like anti-aliasing. The resulting
>> image shows each pixel that has an adjacent pixel with enough contrast
>> with the original pixel. In the end, the tool creates outlines in the
>> page of what I call "contrast borders" that show where the contrast
>> exceeds the given WCAG conformance level.
>>
>> It lets you choose between AA and AAA, and also for standard sized
>> text or medium-bold/larger text. The tool does require you to know
>> what size text you are analyzing because it is simply doing pixel
>> analysis. It has no idea what it is actually analyzing.
>>
>> Another result of this is it will analyze contrast in images too.
>> While contrast in images is not a WCAG requirement, it comes in handy
>> when you need to analyze text in a picture, which is a WCAG
>> requirement.
>>
>> Greg
>> --
>> Greg Kraus
>> University IT Accessibility Coordinator
>> NC State University
>> 919.513.4087
>> gdkraus@ncsu.edu
>>
>> On Mon, Aug 11, 2014 at 6:24 AM, Marc Haunschild <mh@zadi.de> wrote:
>> > Hi Jan,
>> >
>> > I can just describe my practice: when I measure contrast with cca I try to
>> > find a quite dark pixel (on light background) - normally this has less
>> > contrast than the colors defined in the CSS.
>> >
>> > If the contrast is not high enough, I recommend to change the colors.
>> >
>> > Of course this is not for official testing (like in BITV-Test), but for real
>> > life accessibility I think it is a good compromise.
>> >
>> > Reasons: On the one hand a user is able to change the Clear Type value
>> > himself or to use a bigger font, on the other hand the author of the web
>> > site improves the accessbility a little bit more than WCAG aks him to do.
>> >
>> > To me accessibilty is a matter of fairness and to me it seems to be fair,
>> > the way I measure contrast. So I do it this way. ;-)
>> >
>> > Marc
>> >
>> >
>> > Am 11.08.14 12:05, schrieb Joe Chidzik:
>> >
>> >> Whenever I've used the CCA with IE, fonts appear anti-aliased, meaning it
>> >> is not clear which pixel to pick for the actual text colour. Firefox does
>> >> not exhibit this problem for me, and so I've always used Firefox when
>> >> measuring contrast with the CCA just to be sure I'm selecting the colours
>> >> specified by the CSS.
>> >>
>> >> I don't know if it's possible to detect (via CSS\JavaScript) if a user has
>> >> clear type enabled or not, but in my view, measuring the contrast via the
>> >> values provided in the CSS should be all that it is required to check
>> >> adherence to the success criteria.
>> >>
>> >> Joe
>> >>
>> >>
>> >>> -----Original Message-----
>> >>> From: Jan Eric Hellbusch [mailto:hellbusch@2bweb.de]
>> >>> Sent: 11 August 2014 10:45
>> >>> To: w3c-wai-ig@w3.org
>> >>> Subject: measuring contrast ratio and Windows Clear Type
>> >>>
>> >>> Hi,
>> >>>
>> >>> I was giving a seminar the other day on Web accessibility testing and was
>> >>> asked
>> >>> by one of the participants how I measure contrast when clear type is
>> >>> activated. I
>> >>> was caught by surprise, because I had switched it off when setting my
>> >>> Windows 7
>> >>> laptop up a couple of years ago and I never gave it a second thought.
>> >>> Since then I
>> >>> have been measuring contrast ratios with clear type switched off.
>> >>>
>> >>> I have been trying to find more detailed information on the precise
>> >>> differences in
>> >>> measuring contrast ratios with and without clear type on Windows, but I
>> >>> obviously
>> >>> have the wrong search terms. Perhaps someone on this list can point me
>> >>> out in
>> >>> the right direction?
>> >>>
>> >>> * Using CCA there is the possibility of grabing several pixels at a time.
>> >>> Does that solve the problem of measuring a correct contrast ratio?
>> >>> * Or do I have to switch clear type off or  (in Firefox) set
>> >>> gfx.content.azure.enabled
>> >>> to false?
>> >>>
>> >>> I would greatly appreciate a hint or a resource.
>> >>>
>> >>> Thanks,
>> >>> Jan
>> >>>
>> >>> --
>> >>> Jan Eric Hellbusch
>> >>> Tel.: +49 (231) 33005825 oder +49 (163) 3369925
>> >>> Accessibility-Beratung: http://2bweb.de
>> >>> Blog: www.chemnitzer-14.de
>> >>> Bücher, Artikel: www.barrierefreies-webdesign.de
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Mit freundlichen Grüßen,
>> >
>> > i. A. Marc Haunschild
>> > Zugängliche Anwendungsentwicklung und Qualitätskontrolle
>> > ________________________________________
>> > Referat 414 / Abteilung 4
>> > Bundesanstalt für Landwirtschaft und Ernährung
>> > Deichmanns Aue 29, 53179 Bonn
>> > Telefon: +49 (0)228 996845-7324
>> > Fax: +49 (0)228 6845-3101
>> > E-Mail: marc.haunschild@ble.de
>> > Internet: www.ble.de ( http://www.ble.de/ )
>> >
>

Received on Tuesday, 12 August 2014 15:16:20 UTC