comet.color¶
The comet.color module provides access to a documents swatches and color settings.
Methods¶
- comet.color.createGray(value: float = 0.0) CColor ¶
Create a CColor object with a gray value.
- Parameters:
value (float) – The gray value in range[0.0, 1.0]
- Returns:
The newly created color
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameters are out of range
- Available:
InDesign® comet_pdf® Illustrator®
- Examples:
Create a 50% gray color.
- comet.color.createRGB(R: int = 0, G: int = 0, B: int = 0) CColor ¶
Create a CColor object with RGB values.
- Parameters:
- Returns:
The newly created color
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameters are out of range
- Available:
InDesign® comet_pdf® Illustrator®
- Examples:
Create a red RGB color.
Create a purple RGB color.
- comet.color.createCMYK(C: float = 0.0, M: float = 0.0, Y: float = 0.0, K: float = 0.0) CColor ¶
Create a CColor object with CMYK values.
- Parameters:
- Returns:
The newly created color
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameters are out of range
- Available:
InDesign® comet_pdf® Illustrator®
- Examples:
Create a green CMYK color.
Create an orange CMYK color.
- comet.color.createLAB(L: float = 0.0, A: int = 0, B: int = 0) CColor ¶
Create a CColor object with LAB values.
- Parameters:
- Returns:
The newly created color
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameters are out of range
- Available:
InDesign® comet_pdf® Illustrator®
- Examples:
Create an orange LAB color.