Scribus Forums

Scribus => Beginner Talk => Topic started by: pierre77 on May 10, 2013, 02:19:24 PM

Title: create a color palette CMYK xml
Post by: pierre77 on May 10, 2013, 02:19:24 PM
Hello,

I try to create a custom CMYK color palette from an xml file, but I have a little trouble

I took the example of a xml file in /usr/share/scribus/swatches/
here is the file with several examples to import a CMYK color 10% 100% 80% 5%:
<?xml version="1.0" encoding="UTF-8"?>
<SCRIBUSCOLORS Name="personal_color">
<COLOR Spot="0" Register="0" NAME="color_1" CMYK="0.1 1 .8 .05"/>
<COLOR Spot="0" Register="0" NAME="color_2" CMYK="10 100 80 5"/>
<COLOR Spot="0" Register="0" NAME="color_3" CMYK="10% 100% 80% 5%"/>
<COLOR CMYK="0.1 1 .8 .05" NAME="color_4" />
<COLOR CMYK="10 100 80 5" NAME="color_5" />
<COLOR CMYK="10% 100% 80% 5%" NAME="color_6" />
</SCRIBUSCOLORS>


But it does not work.  :(
Do you know the syntax for xml  color pallete?

Regards
Pierre
Title: Re: create a color palette CMYK xml
Post by: GarryP on May 10, 2013, 03:34:01 PM
If you're just trying to make your own swatch to use in various Scribus documents I think it would be easier to use the Scribus colour editing tools to create your colours. Then save the blank document. Then import the colours from this document into your other documents. This way you can have an instant preview of what the colours look like when you're creating them.

However, if, on the other hand, you're also using the XML in other applications then all of the XML colour swatches I've looked at are coded with things like CMYK="#000d194a" so I'd guess this is the CMYK format you should be using. I'm also guessing that "#ff" would be 100% so values between 0 and 100 will need to be multiplied by 2.55 to give the appropriate hex value (and possibly rounded up/down), e.g. 40% Magenta = 40*2.55 = 102 = #00660000. But, like I say, this is just a guess and maybe someone who really knows what they're doing can give a better answer. It's worth a try in the meantime.

This example works just fine:
<?xml version="1.0" encoding="UTF-8"?>
<SCRIBUSCOLORS Name="My Colours">
<COLOR NAME="My Pink" CMYK="#00660000" Spot="0" Register="0"/>
</SCRIBUSCOLORS>
Title: Re: create a color palette CMYK xml
Post by: pierre77 on May 16, 2013, 11:40:31 AM
I use ColorMunki with argyll to recover the CMYK value of paper

spotread of Argyll returns me a LAB value that I need to convert to CMYK with xicclu

I think I'm going to insert the colors manually to avoid any conversion : CMYK >> LAB >> hex

Thank you for the answer