1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use ;
use *;
/// Format of the color
/// - Rgb - 3 floats each with range [0-1]
/// - Lab - 3 floats with L in range [0-1] and A, B in range [-128.0, 127.0]
/// - Cmyk - 4 floats each with range [0-1]
/// - Gray - 1 float with range [0-1]
/// Type of the Color Object
///
/// _From <https://pypi.org/project/swatch/>_
/// > Process colors are standard colors, this is the default if you define a new color in illustrator. As the name implies, they’re mixed from either RGB or CMYK depending on the document color mode.
///
/// > Global colors are the same thing as process colors, but they have one neat property which is that when you update them, they are updated all throughout your artwork. This makes them something like “color references” and quite useful if you’re doing something like reskinning some extant document.
///
/// > Spot colors are implicitly global but have the nifty property that you can create new swatches from them based on “tints” or, effectively some screened value of that color. The only hitch is that tints, even though they can be part of your file, can’t be stored/exchanged as swatches. I’m on the fence as to how problematic this is, but that’s just how it goes. Even illustrator won’t save them out, it’s just not supported in the app (almost certainly due to the nature of the file forma
/// Color data
///
/// Stores individual color information.
/// A Color object
///
/// Stores data associated with a color object.
/// Swatch object
///
/// Stores a group of `ObjectColor` under a name.