[CREATE] assets library

Jon A. Cruz jon at joncruz.org
Thu Sep 27 20:57:12 PDT 2007


On Sep 26, 2007, at 12:49 AM, Tor Lillqvist wrote:

> <space name="RGB">
>   <color name="blue">0 0 1</color>
> </space>

Looking to "XML-ness" of things, there are a few points that come to  
mind.

The actual contents of the color there are just a free-form text  
blob. Not as handy.

Also... I would not think that a color space would be the "thing that  
logically hold a bunch of colors". Yes, colors are in a colorspace,  
but that is more of an attribute of the colors.

<color name="blue" colorspace="2ndFloorCMYK">
    <sRGB r='0' g='0' b='0'/>
</color>
...
<colorspace name="2ndFloorCMYK" xlink:href="2nd_floor.icm"/>


So in this refactoring, the <color> element is the key container. One  
attribute of any color is it's functional name, so that is there.  
Another attribute of a color is the colorpsace it is in. Then I've  
added the actual RGB value as an <sRGB> element, since that's a handy  
fallback. And since it is a child element, it's easily optional.

Hmm... but as I think about it, the colorspace is not really an  
attribute of that swatch, but of a specific implementation of it.

<color name="blue">
    <icc-color space="2ndFloorCMYK" val="0, 0.75, 0, 1"/>
    <sRGB r='0' g='0' b='0'/>
</color>
...
<colorspace name="2ndFloorCMYK" xlink:href="2nd_floor.icm"/>


Then another XML consideration comes up. What about  
internationalization? Is there any data that might be translatable or  
perhaps could use multiple variants? If so, then an element is  
warranted instead of an attribute. I could see that a name would be  
very useful. Also we would want to avoid overloading the term "name"...

<color name="blue">
    <label lang="en">Blue</label>
    <label lang="es">Azul</label>
    <label lang="en_US_SoCal">glassy</label>
    <icc-color space="2ndFloorCMYK" val="0, 0.75, 0, 1"/>
    <sRGB r='0' g='0' b='0'/>
</color>
...
<colorspace name="2ndFloorCMYK" xlink:href="2nd_floor.icm"/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/create/attachments/20070927/475b0ef7/attachment.html 


More information about the CREATE mailing list