OT: Type on Background - Contrast Ratios

hh hh at hyperhh.de
Thu Oct 6 22:06:37 EDT 2016


Peter M.B. wrote:

> But isn’t there something more fundamentally wrong with this measure,
> with the criteria outlined by Sannyasin:
>> *   Small text should have a contrast ratio of at least 4.5:1 against
> its background. A ratio of 7:1 is preferred.
>> *   Large text (at 14 pt bold/18 pt regular and up) should have a
> contrast ratio of at least 3:1 against its background.
> If you’re comparing something with black, it’s very easy to get a high
> luminance ratio but text will still be unreadable. Try setting a field’s
> forecolor to 5,5,5 and the backcolor to 45,45,45. The luminance ratio
> is 8.27, but you can’t read the text at all.

You are convincing with your example, of course.

As the script-link given by Colin shows, the matter is very complicated
(and complicated to code). I'm not at all an expert with luminance, do
such things by trial and error.

Jacques probably tried by intention to give a simple method and forgot to
exclude the divide-by-zero part. That's why I cited the contrast "formula".



More information about the use-livecode mailing list