- From: Mike Bremford via GitHub <sysbot+gh@w3.org>
- Date: Fri, 01 Dec 2017 12:52:13 +0000
- To: public-css-archive@w3.org
faceless2 has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-color] Separation / DeviceN color support == It's unclear how to define what are called "DeviceN" colors in PDF in css-colors-4, or even if it's possible. This is a concern for us as we develop our CSS to PDF converter, as ideally we would like to see css-colors cover the full gamut (ahem) of color spaces available in PDF. The option to supply named strings to the color() function is, I presume, intended to enable spot colors. Without an example it's hard to see how this will work, but the current syntax ```` color() = color( [ <ident>? [ <number>+ | <string> ] [ / <alpha-value> ]? ]# , <color>? ) ```` seems to imply something like this: ```` color: color(profilename "Pantone Reflex Blue CVC", lab(26.18, 18.64, -59.95)); ```` Only a single string is allowed, which means I am limited to using only one ink: from a PDF point-of-view I can define only a _Separation_ color, not the more general _DeviceN_ color. Also, I still have to specify the profile (or have it default to sRGB), which makes no sense in this context: If the device has the named ink, it will be used; if it doesn't, the fallback (which defines its own color space) will be used. Either way the ICC profile, defined here as "profilename", is unused. Finally, I have no means of specifying _how much_ ink. When specifying CMYK, for example, I can specify 80% cyan, 20% magenta. But this syntax doesn't allow that. I can name the ink, but that's it _(and the quantity of ink is distinct from the alpha value; if we ignore overprinting, 0% black is not transparent; it's white)_. I think this is easy to improve upon, but it might be better in a new function instead of overriding color(). A syntax like this: ```` color: separation("Pantone Reflex Blue CVC" 50%, lab(26.18, 18.64, -59.95)); ```` would allow you to specify the level of ink (50%), which the current syntax doesn't. You could also use multiple inks: ```` color: separation("Cyan" 0.8 "Magenta" 0.4 "Yellow" 0 "Black" 0 "Pantone Hexachrome Cyan C" 0.2 "PANTONE 1505 C" 0.4 "PANTONE 1355 C" 0 "PANTONE 1365 C" 0 PANTONE 7468 C" 0 PANTONE 476 C" 0, lab(80 -20 -40)); ```` With nine inks that may look ridiculous, but it's an actual ColorSpace extracted from a PDF document in our test corpus. The syntax I had in mind here is: ```` separation ( [ string number-or-percentage ] {1,n} , color ) ```` The concepts here directly translate to the DeviceN color space in PDF, which means that css-color-4 could represent any block color used in PDF. (Also, by specifying the component values of all the inks, even the unused ones, it means using colors like this in a linear-gradient has a fairly well-defined solution, assuming the inks are the same on both sides of the gradient.) Sorry if this has been discussed elsewhere, I didn't find mention of it here. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2023 using your GitHub account
Received on Friday, 1 December 2017 12:52:15 UTC