From 5a9911c18e25e96e28bc26555bef450079d7bb06 Mon Sep 17 00:00:00 2001 From: Tab Atkins-Bittner Date: Tue, 4 Feb 2025 13:27:14 -0800 Subject: [PATCH] [css-color-5] Simplify contrast-color(), per WG resolution. #11534 --- css-color-5/Overview.bs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/css-color-5/Overview.bs b/css-color-5/Overview.bs index 33c47675648..16341fd5ac1 100644 --- a/css-color-5/Overview.bs +++ b/css-color-5/Overview.bs @@ -2606,23 +2606,17 @@ or any other color or monochrome output device which has been characterized. the surrounding colors, etc.
-		contrast-color() = contrast-color( <> max? )
+		contrast-color() = contrast-color( <> )
 	
- If ''max''' is specified, the function computes to ''white'' or ''black'', - depending on which of the two produces _maximum_ color contrast for text when the input color is used as a solid background. - If both colors produce the same contrast, the function should return ''white''. - - If ''max''' is omitted, the function computes to a very light or very dark color (which may still be white or black), - which will contrast well with the input color when used as a text color and the input color is used as a solid background. - The function MUST return a light color if it would have returned ''white'' if ''max'' were specified, - and a dark color if it would have returned ''black'' if ''max'' were specified. - - Note: The precise requirement for how close these colors need to be to white and black - and what color difference measure to use for that are still under discussion. + ''contrast-color()'' resolves to either ''white'' or ''black'', + whichever produces maximum color contrast for text + when the input color is used as a solid background. + If both ''white'' and ''black'' produce the same contrast, + it resolves to ''white''. The precise color contrast algorithm for determining whether to output a light or dark color - is UA-defined at this level, as is the precise color produced when ''max''' is omitted. + is UA-defined at this level. Note: Future versions of this specification are expected to introduce more control over both the contrast algorithm(s) used, the use cases, as well as the returned color.