Hi Jon, and all
Attached is the SVG colour set we discussed today. Its only in the X11 rgb.txt format but it is complete and (hopefully 100%) correct. When/if we come up with an XML format it can be converted.
At the moment that color set is in Inkscape under inkscape/src/svg/svg-color.cpp
Maybe someone should verify it's the same.
Oh, and I took a peek at the CxF paper, and though a little of it can be overkill, it's fairly optional and does contain a lot of information that we could need.
Looking at just the CxF sample I think its pretty huge for what in the end turns out to be a basic need which isnt too big in the end.
Peter and I discussed it later today a little further. In the end we came to the conclusion that there is no real need to store anything other that pure colours, whether that be in RGB or CMYK (or perhaps HSV?). The idea is to share colours, not the use of them. That is, so we can share a colour set so when a file is loaded, the same colour set is accessible in Inkscape and Scribus etc.
The named SVG colour chart stores the colours in RGB values only - it does not have/need anymore information.
For our purposes, especially in Scribus, users WILL want to be able to define CMYK colour sets. If we don't, they WILL ask how to do it so in this case its better to get it done correctly from stage 1.
I grabbed some info from: http://marvin.mrtoads.com/richblack_vs_plainblack.html
The example is black: In RGB, Black is RGB:0,0,0 In the printing world you have other blacks such as: Rich Black: CMYK(%):63,52,51,100 Cool Black: CMYK(%):60,0,0,100 Warm Black: CMYK(%):0,60,30,100
I pretty sure we can handle those ok in Scribus.
So onto the XML. Firstly. I'll say I'm no XML expert so what I'm typing is just a rough guesstimate of some markup, given the above,
<colorset name="reds"> <color type="rgb" name="my-red" red="f" blue="0" Green="0" /> <color type="rgb" name="my-red" red="ff" blue="00" green="00" /> <color type="rgb" name="my-red" red="100%" blue="0%" green="0%" /> <color type="cmyk" name="my-red" cyan="0" magenta="255" yellow="255" black="0" /> <color type="cmyk" name="my-red" cyan="0%" magenta="100%" yellow="100%" black="0%" /> </colorset>
They are the kind of lines I see possible. Someone with real XML knowledge can convert it to something useful. :)
I have used the RGB definitions based on the SVG colour specifications and also given them for CMYK versions, hence the f,ff,100% equivalents.
Going back to what I said above, this is about sharing NAMED colours, not really their uses. Its about giving the Inkscape users the ability to choose "Red" instead of having to use sliders or wheels or entry fields etc, and to make sure that "Red" can come across to Scribus ok, and vice versa. (Note: "Red" in one colour set might be RGB:0,0,0 if someone wants to call it that - kind of like redefining a style in CSS. Scribus supports this kind of "Colour Style" inherently with named colours. Changing the 0,0,0 to something else changes the elements with that named colour.)
So, do we need transparency/opacity values? Maybe... but are we going to give the option to a user to use a predefined RGBA colour or just give them an RGB colour and they set the opacity/transparency etc for that document element?
Surely the opacity etc is a choice for the document, not for the colour set and therefore not in the colour set but held in the document elements paired with the actual colour like they are now. If others disagree, its easy to add an attribute or two.
hmm.. thats where I'm at with it all, and I'll leave it there for comment.
regards Craig