W3C home > Mailing lists > Public > www-svg@w3.org > June 2010

RE: Named colors in SVG

From: Leonard Rosenthol <lrosenth@adobe.com>
Date: Wed, 16 Jun 2010 01:43:08 -0700
To: Chris Lilley <chris@w3.org>, Jeremias Maerki <dev@jeremias-maerki.ch>
CC: "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <D23D6B9E57D654429A9AB6918CACEAA97D210261EC@NAMBX02.corp.adobe.com>
That is correct - PDF does not support Named Profiles.  It only supports 1, 3 and 4 color profiles (specifically, Gray, RGB, Lab and CMYK) when embedded in the PDF for either source or destination profiles.  In addition, it supports n-color profiles for an output profile (OutputIntent) as originally defined in PDF/X-5p (ISO 15930-8).

To defined a named (aka Spot aka Pantone, etc.) color in PDF, you indeed create a Separation colorspace which includes an alternate colorspace and tint transform function - but those are only used when the actual named color is unavailable (aka on a screen).

Yes, in the case of using a mixture of 6 inks - that's indeed a DeviceN colorspace that should be used.

Tint values are only used for separation because of lack of other information.  If you have a named color profile, then you don't need the tint value in the same way.  The future direction here for ICC and PDF is to move to spectral data via something like CxF.

Leonard

-----Original Message-----
From: Chris Lilley [mailto:chris@w3.org] 
Sent: Tuesday, June 15, 2010 10:09 PM
To: Jeremias Maerki
Cc: www-svg@w3.org; Leonard Rosenthol
Subject: Re: Named colors in SVG

On Tuesday, June 8, 2010, 2:31:39 PM, Jeremias wrote:

JM> Hi folks,

JM> I'm looking into adding support for named colors to Apache Batik and
JM> I've got a few observations/comments concerning the current working
JM> draft of SVG Color 1.2
JM> (http://www.w3.org/TR/2009/WD-SVGColor12-20091001/).

Jeremias, very happy to hear that you are working in this area.

JM> --- ICC named color profiles in general

Some background here
http://www.colorwiki.com/wiki/The_7_ICC_Profile_Types#Named_Color_Profiles

JM> I've just spent about 3 hours looking around on the internet, trying to
JM> find example ICC named color profiles or some freely available tool to
JM> create such color profiles. I haven't found anything. Does anyone have
JM> something in this direction for me? I'm almost at the point where I have
JM> to think about writing such a tool myself.

commercial
http://www.tglc.com/english/01_1_num_recettes.html

free
LittleCMS2 (lcms2)
http://littlecms2.blogspot.com/

lcms can build and read such profiles but does not ship with them in the samples area unfortunately.

swatchbooker reads (now) and writes (in future) ICC named profiles along with other swatch formats
http://www.selapa.net/swatchbooker/


sampleicc has some sample code of named icc profiles
http://sampleicc.sourceforge.net/
but does not ship  with such samples. The code looks as if it can read and write them.


JM> My main goal is to produce PDF. But like PostScript, PDF doesn't support
JM> ICC named color profiles.

Really?

You mean, the latest PDF specification does not? Or an older, but widely implemented PDF spec does not? Or that PDF does but tools do not?

Copying Leonard Rosenthol <lrosenth@adobe.com> on this email, since he knows far more about PDF than I do and represents Adobe on the ICC committee.

JM>  You have to resort to the "Separation" color
JM> space which requires a PostScript function which transforms the tint
JM> value to an alternative color space (be that CMYK, RGB or CIElab).

I'm not sure separations are the same. Separations are, well, separate; they don't interact except on the final printed page. They include corrections for blocking and trapping. For separations, the SVG 'device-color' concept seems more appropriate.

JM> So I'm trying to figure out the best way to implement this. In the
JM> absence of an easy way to create and consume ICC named color profiles,
JM> it seems easiest to define abstract URIs used on the svg:color-profile
JM> element to define a set of named colors (defined by some means other
JM> than an ICC profile which could be considered a hack).

It is a bit of a hack, yes :) 

If you want to support legacy swatch formats, such as
http://www.selapa.net/couleurs/fileformats.php
or create (another) new one (for example to allow easy creation with a text editor) then making a tool which reads one or more such formats and outputs ICC named profiles looks like the way to go.

Two good contacts would be Kai-Uwe Behrmann, who develops the Oyranos and ICC-Examin tools
http://www.behrmann.name/
and Marti Maria, lead developer of lcms2
http://littlecms2.blogspot.com/

One or other of those would be able to get you started on a tool to write named ICC profiles, using their existing libraries to do the heavy lifting.


JM> In my particular case I need to support, there's no color profile. The
JM> print service provider has defined the named color directly on the RIP
JM> using a mixture of the 6 inks available in the printer. So I just need a
JM> way to get the color name and an sRGB value (for the tint transform
JM> function) into the PDF using the "Separation" color space.

That doesn't sound like named ICC profiles; it sounds like device-n.

JM> --- tint support

JM> The PDF and PostScript specifications allow for a "tint" value for
JM> Separation colors. I was wondering if it made sense to add an optional
JM> tint value to the icc-named-color function. The spec would then be:

JM> <fallback> icc-named-color(<name>, <namedColor>[, tint])

JM> Valid values for the parameter "tint" are in the range 0.0 to 1.0. The
JM> value 0.0 represents the minimum amount of colorant that can be applied;
JM> 1.0 represents the maximum. In the absence of the tint parameter, the
JM> initial value is 1.0.

JM> Example:
JM> <circle fill="#8080FF" icc-named-color(MyColors, SpecialBlue, 0.5)"/>

That is an interesting suggestion. However, would the result be an actual, colorimetrically defined color? Or would it be a recipie, which only results in a visible color on the output device?

In other words if SpecialBlue has LAAB coordinates Lb ab wb and the current white has LAB coordinates Lw aw bw, is there an equation that gives the LAB coordinates of thre 50% tint? Or does that require press characterisation?

This for example does result in a color:

<circle fill="#8080FF" icc-named-color(MyColors, SpecialBlue)" 
  fill-opacity="0.5"/>

JM> --- typos

JM> BTW, there's a little typo in the existing example: the closing
JM> paranthesis is missing.

Thanks, will fix.

JM> Thanks,
JM> Jeremias Maerki (not yet a color specialist)






-- 
 Chris Lilley                    mailto:chris@w3.org
 Technical Director, Interaction Domain
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG
Received on Wednesday, 16 June 2010 08:43:54 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:45 GMT