From 83667a906d7cac842635bc5243db70f55b346562 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 26 Jan 2023 19:34:21 +0100 Subject: 2023-01-26 18:34:00 --- tex/context/base/mkiv/colo-ini.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tex/context/base/mkiv/colo-ini.lua') diff --git a/tex/context/base/mkiv/colo-ini.lua b/tex/context/base/mkiv/colo-ini.lua index 136f5b435..7a53ca71f 100644 --- a/tex/context/base/mkiv/colo-ini.lua +++ b/tex/context/base/mkiv/colo-ini.lua @@ -662,7 +662,7 @@ local function definemixcolor(makecolor,name,fractions,cs,global,freeze) if not v then return end - values[i] = v + colorvalues[i] = v end if #values > 0 then csone = values[1][1] @@ -1366,7 +1366,14 @@ implement { end } --- playground for MS and HH +-- This is a playground for MS and HH: +-- +-- Required Contrast Ratios for WCAG Conformance (how about small text) +-- +-- Level AA Text 4.5:1 for regular text and 3.0:1 for large text (18pt or 14pt/bold) +-- Level AAA Text 7.0:1 for regular text and 4.5:1 for large text (18pt or 14pt/bold) +-- +-- Level AA Non-Text 3.0:1 for user interface components and graphics do @@ -1378,7 +1385,7 @@ do end local function luminance(color) - color = values[color] + color = colorvalues[color] if color then return (0.2126 * crap(color[2]) + 0.7152 * crap(color[3]) + 0.0722 * crap(color[4])) + 0.05 end -- cgit v1.2.3