OT: Type on Background - Contrast Ratios
J. Landman Gay
jacque at hyperactivesw.com
Fri Oct 7 00:39:24 EDT 2016
Actually I did hit the divide by zero error, which is why I added the
min/max test. But your solution was better.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 6, 2016 9:08:42 PM hh <hh at hyperhh.de> wrote:
> Peter M.B. wrote:
>
>> But isnt 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 youre comparing something with black, its very easy to get a high
>> luminance ratio but text will still be unreadable. Try setting a fields
>> forecolor to 5,5,5 and the backcolor to 45,45,45. The luminance ratio
>> is 8.27, but you cant 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".
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list