OT: Type on Background - Contrast Ratios

Colin Holgate colinholgate at gmail.com
Thu Oct 6 14:13:43 EDT 2016


This page does that:

http://leaverou.github.io/contrast-ratio/

Here’s their Javascript that does the job:

http://leaverou.github.io/contrast-ratio/contrast-ratio.js


> On Oct 6, 2016, at 10:58 AM, Sannyasin Brahmanathaswami <brahma at hindu.org> wrote:
> 
> For the RGB wizards… what is the algorithm to determine the luminance ratio between two colors?
> 
> See w3C recommendations posted in today's Adobe's XD newsletter (useful feed) below.
> 
> I'm thinking the total value of all three will serve.
> 
> 
> The WC3 sets minimum standards for contrast ratios, which represent how different a color is from another color (commonly written as 1:1 or 21:1, the higher the difference between the two numbers in the ratio, the greater the difference in relative luminance between the colors). The W3C recommends the following contrast ratios for body text and image text:
> 
>  *   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.
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 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