1 person found this helpful
well, I'm not good at CustomColorSuite, but anyway...
Did some tests. Seems that "Black" is a reserved name for spot colors only, not for global process colors.
At least this string works without errors:
error = sAICustomColor -> NewCustomColor (&customData, ai::UnicodeString("Black"), &newColor);
"without errors" means that after GetCustomColorName (newcolor) I get unicode string containing "Black" :-)
but I noticed that Illustrator crashes if flag for customdata is set to kCustomSpotColor and color is applied afterwards to some object with:
MyAIColor.c.c.color = newColor;
So if you need global process color, you shoud avoid this flag.
I have had very similar results. I may not be actually naming the type of color I'm looking to achieve correctly. I know that in Illustrator, I can get Black to appear in the swatches with the "Spot" indicator next to it, and in the color settings viewable through the swatch panel, it is a Global Process color.
I remember doing some testing with an older SDK, and I had a hard time corresponding the CustomColorSuite settings to what would show up in Illustrator, but I did eventually get there.
I've had to use a couple different workarounds to get Black to work the way I want, but I do have it working 99% of the time.
I just get the occasional crash on trying to modify Black, which prompted me to post the other day, since it seems like there should be a "right" way to do it, instead of what I'm doing which has a sort of smell.