Forum How do I...?

Spot Colors / SVG

Snerf
I am trying to apply a spot color to an SVG object, and this is what I have on my CSS so far.

@prince-color spotuv {
alternate-color: cmyk(0,100,0,0)
}
color: prince-color(spotuv, overprint)

svg > rect {
fill:prince-color(spotuv);
}


I then make a rect , svg obejct in HTML.

Does this look like the proper way to do this? I am not sure if I can use a prince color as a fill attribute.

Thanks
Snerf
I am wondering if this could work as well.

<rect width="100" style="fill: spotuv" height="100"></rect>

So it gets the color name from the spotuv named color that is created in the style sheet.
mikeday
You can use fill="prince-color(spotuv, overprint)" in SVG and that should work fine. Minor point, the cmyk() function takes values between 0 and 1, or percentages between 0% and 100%, so the 100 should be 1 or 100%.
Snerf
Thanks, but the PDF generated just shows a black box, not a magenta one.
mikeday
Which PDF viewer are you using? Can you try converting this SVG to PDF and see how it looks:
<svg width="4cm" height="4cm" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
    <style>
        @prince-color spotuv {
            alternate-color: cmyk(0, 1, 0, 0)
        }
    </style>
    <rect x="1" y="1" width="398" height="398"
        fill="none" stroke="blue" />
    <path d="M 100 100 L 300 100 L 200 300 z"
        fill="prince-color(spotuv, overprint)" stroke="blue" stroke-width="3" />
</svg>
Snerf
Well, now it looks magenta.

I was using Adobe Reader to view it, and now I see a magenta triangle.

So the PDF file shows it as magenta, but that is how our printer is also printing it.

Do you know if there is any way to add a layer called "Clear" and apply this object to that. Basically, our printer then will see it as a clear layer, and print the color Clear, instead of magenta.

Here is a link to the document from the printer that shows you how to do it with Adobe InDesign, and I am just wondering if there would be any way possible to do this with prince? Read from the "Watermark" section.

http://download.support.xerox.com/pub/docs/800_1000_DCP/userdocs/any-os/en_GB/DesignTips_CDI-Xerox800-1000Presses_SRA3_HR.pdf

We currently have to create PDF's, and then re-build them in InDesign to add the Clear, and I am looking at a way to automate it by adding SVG to the PDF and automating the process, basically.

Thanks
mikeday
What if you just call the color "Clear" instead of "spotuv", is the printer looking for a specific named color?
Snerf
Ok, so setting it to "Clear" helped, but it did not print clear.
So I opened the PDF in Adobe Illustrator, and looked at the layer the SVG is on, and it was not set to overprint.

It may be that the Document Color Mode is RGB, where it needs to be CMYK.
mikeday
I'm not entirely sure what this means. We do specify an RGB color space for the page transparency group when images with opacity are being used; would it help to change this to CMYK in some circumstances? I'm not sure exactly which circumstances, though.
Snerf
How could I make the PDF with a CMYK color space?
mikeday
We don't have an option for this yet, perhaps you could email me (mikeday@yeslogic.com) a sample HTML document you are converting and I'll make the changes here and send you back the PDF to test.
Snerf
No, thanks for the offer.
Will see what we can do, it works a lot better then it did before, I think I just need to mess with the svg a bit, but we did manage to work a lot better if no image was embedded in the PDF, so it is a big step forward.

Thanks again