cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to get pure black (in CMYK terms) from Styler (APP)

ClayHelberg
18-Opal

How to get pure black (in CMYK terms) from Styler (APP)

Hi folks--

We have a customer who would like the black in their PDF output to be pure black (in CMYK terms, all K, i.e. 0,0,0,100%). By default, black is rendered as composite black (a combination of all CMYK colors).

I have found how to change it for particular contexts via APP source edits, but I'm hoping someone can point me to a more direct way to configure APP to always map "black" to CMYK: 0,0,0,100). Is there a way to redefine the color "black" and/or the default color in a single place in the stylesheet, either directly in Styler or via APP source edits? Ideally this would also apply to things like table borders and header/footer rule elements.

Thanks.

--Clay

ACCEPTED SOLUTION

Accepted Solutions

The problem is that this stuff is baked in to the Styler/APP integration. Styler is not really designed for accurate CMYK work, it supports RGB and CMYK as a side-effect.

The colours are not APP's fault, so there is no easy one-shot fix in APP edited source. There are a number of instances where Styler is assuming and using RGB colours. For one example look in $EDITOR/app/libs/APPStyler/_app.3ns, method "StylerForegroundColour". It is defaulting to #000000, and is not drawing the default from anywhere else. Presumably the rest of Styler does similar things, so you have to patch up each and every instance.

One interesting note during my investigations is that there is a template.options JS attribute where you can set up some colours, default padding, etc., but I don't know how or even if you're meant to use that. Perhaps a trip to PTC support may confirm if there is a simpler way to override colouring in Styler.

View solution in original post

5 REPLIES 5

Hi Clay

You can associate a template with nothing in it besides a custom colour definition tag (.cl) with whatever you want custom,  gradients,  pantones etc,  then call that colour using its name via source edit.

Or you can use {0,0,0,0} type values directly as the value of the source edit properties.

Hope thats useful

Best regards

Chris

Hi Clay,

Welcome back to the world of Styler and APP

It appears that Styler defaults to using RGB colour definitions. I can reproduce what you are seeing in APP Desktop if I define my black colour as an RGB such as #000000. APP defaults to output of CMYK so RGB colours are converted - and it seems the RGB #000000 blacks end up being converted to what is known as "rich black" (google it).

So, you have two options: (1) switch APP to output PDF with pure RGB; (2) switch Styler to use CMYK colours.

If you need CMYK output, and want precision in the CMYK colour definitions, then it is best to define your colours as CMYK and not RGB. I'm not sure if Styler allows CMYK colour definitions but I'd look into that first. e.g. can the .style file attribute color="#AABBCC" be color="{1,2,3,4}"? (The curly brace syntax is APP CMYK colour definition in percentages)

If Styler cannot allow you to enter CMYK colours, then you will have to do what Chris suggests using source edits and possibly associating a .3f file which will hold your CMYK colour definitions.

Thanks, Chris & Gareth. I have been able to do as you both suggest, using source edits with explicit CMYK color definitions for specific contexts. So, for example, I've been able to change most of the text to use CMYK(0,0,0,100). But there are still bits here and there, such as table borders and header rules, that are coming in as "rich black", and ideally I want to get those changed over to pure black as well.

Gareth, I haven't found a way to define a color as CMYK in Styler directly, I've only been able to do it via APP source edits.

I was really hoping there was a simple way to override the default definition of "black", or the default color applied when no explicit color is specified (which is black, but the wrong kind of black), so I could just change the one definition and get what I want pretty much everywhere.

Also, regarding table borders, I haven't had much luck tracking down where the source edits would go for that. I've looked at table and entry contexts, but haven't found anything that looks like it would affect formatting of table borders. Any hints about that?

The problem is that this stuff is baked in to the Styler/APP integration. Styler is not really designed for accurate CMYK work, it supports RGB and CMYK as a side-effect.

The colours are not APP's fault, so there is no easy one-shot fix in APP edited source. There are a number of instances where Styler is assuming and using RGB colours. For one example look in $EDITOR/app/libs/APPStyler/_app.3ns, method "StylerForegroundColour". It is defaulting to #000000, and is not drawing the default from anywhere else. Presumably the rest of Styler does similar things, so you have to patch up each and every instance.

One interesting note during my investigations is that there is a template.options JS attribute where you can set up some colours, default padding, etc., but I don't know how or even if you're meant to use that. Perhaps a trip to PTC support may confirm if there is a simpler way to override colouring in Styler.

Hi Gareth--

Thanks for the additional info. I will take your advice and see if I can get some additional guidance from PTC.

--Clay

Announcements

Top Tags