summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/colo-ini.mkxl
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2023-01-26 19:34:21 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2023-01-26 19:34:21 +0100
commit83667a906d7cac842635bc5243db70f55b346562 (patch)
tree6d22734798c775c081c3aecb7f05faf590e6570b /tex/context/base/mkxl/colo-ini.mkxl
parentb47e8c2cdeeab0bcdb1c4c32328c933f3f8599de (diff)
downloadcontext-83667a906d7cac842635bc5243db70f55b346562.tar.gz
2023-01-26 18:34:00
Diffstat (limited to 'tex/context/base/mkxl/colo-ini.mkxl')
-rw-r--r--tex/context/base/mkxl/colo-ini.mkxl25
1 files changed, 25 insertions, 0 deletions
diff --git a/tex/context/base/mkxl/colo-ini.mkxl b/tex/context/base/mkxl/colo-ini.mkxl
index 807fdfad1..a7f483bc2 100644
--- a/tex/context/base/mkxl/colo-ini.mkxl
+++ b/tex/context/base/mkxl/colo-ini.mkxl
@@ -664,6 +664,31 @@
\fetchmodulecommand \showcolor \f!colo_run
+%D This one shows the luminance ratio conform WCAG:
+%D
+%D \starttyping
+%D \starttabulate[||r|]
+%D \NC red \NC \colorluminance{red} \NC \NR
+%D \NC green \NC \colorluminance{green} \NC \NR
+%D \NC black \NC \colorluminance{black} \NC \NR
+%D \NC white \NC \colorluminance{white} \NC \NR
+%D \stoptabulate
+%D
+%D \starttabulate[||r|]
+%D \NC red : green \NC \colorluminanceratio{red}{green} \NC \NR
+%D \NC red : black \NC \colorluminanceratio{red}{black} \NC \NR
+%D \NC red : white \NC \colorluminanceratio{red}{white} \NC \NR
+%D \stoptabulate
+%D
+%D \usecolors[crayola]
+%D
+%D \compareluminance[Jade] [Onyx] \par
+%D \compareluminance[Goldenrod] [Onyx] \par
+%D \compareluminance[CobaltBlue][Onyx] \par
+%D \stoptyping
+
+\fetchmodulecommand \compareluminance \f!colo_run
+
%D It would make sense to put the following code in \type {colo-mps}, but it it
%D rather low level.