How do swatch / colormodels actually work?
the properties of CMYK-color are pretty staight forward:
swatch.colorValue = [33,33,33,100];
swatch.name = "richblack";
swatch.space = "CMYK";
swatch.model = "PROCESS";That is a CMYK richblack called swatch with the CMYK-values (33/33/33/100).
When I setup a spotcolor HKS 4 K, it looks like this:
swatch.name = "HKS 4 K";
swatch.space = "CMYK";
swatch.model = "SPOT";As you can see, it has no color value. Why is this, is there another collection where I can get those? I mean: yes, it is a spot color. But it still needs simulation colors (CMYK or RGB) onscreen, right?
The reason why I'm asking is: Lets say I have a table of colors with LAB, CMYK and RGB-values. Now I want to programmatically pollute the swatches in my active Document with a bunch of spot colors. Lets say we have...
var name = "HKS 4 K";
var cmyk = [0,20,100,0];
How can I:
- if that color is already known, but not a swatch of the current document
--> add it.
- If that color is unknown
--> add it and give it the given CMYK simulation colors?
