From 2640406f5b052dd0b1a420834b4d423a07400928 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 15 Dec 2024 18:48:48 +0000 Subject: [PATCH] Include contrast value in contrast errors --- core/wiki/macros/CSS.tid | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/wiki/macros/CSS.tid b/core/wiki/macros/CSS.tid index 59826452d..44ae8ff64 100644 --- a/core/wiki/macros/CSS.tid +++ b/core/wiki/macros/CSS.tid @@ -79,8 +79,12 @@ tags: $:/tags/Macro [function[colour],] \end color +\function tf.check-colour-contrast-subfunction() +[function[colour],] [function[colour],] +[colour-contrast:DeltaPhi[]fixed[3]] +\end tf.check-colour-contrast-subfunction + \function tf.check-colour-contrast(paletteEntryA,paletteEntryB,threshold) -[function[colour],] [function[colour],] +[colour-contrast:DeltaPhi[]compare:number:gtthen[ok]] :else[addsuffix[/]addsuffixaddsuffix[ contrast is too low]] +[function[tf.check-colour-contrast-subfunction]compare:number:gtthen[ok]] :else[function[tf.check-colour-contrast-subfunction]addsuffix[: ]addsuffixaddsuffix[/]addsuffixaddsuffix[ contrast is too low]] \end tf.check-colour-contrast \define box-shadow(shadow)