- From: Chris Lilley via GitHub <sysbot+gh@w3.org>
- Date: Sun, 29 Mar 2020 03:45:09 +0000
- To: public-css-archive@w3.org
Currently, @color-profile is defined to use a dashed-ident (--foo): ``` @color-profile = @color-profile <dashed-ident> { <declaration-list> } ``` https://drafts.csswg.org/css-color-4/Overview.html#at-profile Now, if I modify this to ``` @color-profile = @color-profile [<dashed-ident> | 'device-cmyk'] { <declaration-list> } ``` then I can allow the UA stylesheet, or author stylesheet, or even the user stylesheet, to have whatever they want used as a default: ``` @color-profile device-cmyk { src: url('https://example.org/Coated_Fogra39L_VIGC_300.icc'); } ``` and the somewhat hand-wavy and aspirational prose: > If the user agent has information about the output device such that it believes it can accurately convert the CMYK color to a correct RGB color, the computed value of the device-cmyk() function must be that RGBA color. Otherwise, the computed value must be the fallback color. and > Ideally, the user agent will be aware of the output device’s color profiles for RGBA and device-CMYK. If this is true, then the user agent must convert between device-CMYK and RGBA colors (and vice versa) by first converting the color into an appropriate device-independent color space, such as CIELab, and then converting into the output color space, using the appropriate color profiles for each operation. > This is not always possible, however. In that case, the user agent must use the following naive conversion algorithms. can be replaced with something clearer, like >> If a valid @color-profile rule is available for device-cmyk, the computed value of the device-cmyk() function must be that CMYK color converted to Lab. Otherwise, (if the profile cannot be retrieved or understood) and a fallback color is present, the computed value of the device-cmyk() function must be that fallback color. If no valid fallback color is specified, the computed value of the device-cmyk() function must be that CMYK color naively converted to sRGB. This gives a clear, ordered list of ways to compute an actual color which can be used in compositing, gradients, and so forth. It also does not constrain the CMYK colors to fall in a particular RGB space (except for the naive conversion, which produces sRGB). And it means that in many cases, people using device-cmky will get usable, reasonable on-screen colors; not necessarily as good as calibrated soft-proofing, but at least useful. -- GitHub Notification of comment by svgeesus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2022#issuecomment-605554108 using your GitHub account
Received on Sunday, 29 March 2020 03:45:12 UTC