Skip to content

cmyk

Defines a CMYK color, used in the SolidColor object.

CMYKColor

Bases: Photoshop

A CMYK color specification.

Source code in photoshop/api/colors/cmyk.py
 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
class CMYKColor(Photoshop):
    """A CMYK color specification."""

    object_name = "CMYKColor"

    def __init__(self, parent):
        super().__init__(parent=parent)

    @property
    def black(self) -> int:
        """The black color value. Range: 0.0 to 100.0."""
        return round(self.app.black)

    @black.setter
    def black(self, value: int):
        self.app.black = value

    @property
    def cyan(self) -> int:
        """The cyan color value. Range: 0.0 to 100.0."""
        return round(self.app.cyan)

    @cyan.setter
    def cyan(self, value: int):
        self.app.cyan = value

    @property
    def magenta(self) -> int:
        """The magenta color value. Range: 0.0 to 100.0."""
        return round(self.app.magenta)

    @magenta.setter
    def magenta(self, value: int):
        self.app.magenta = value

    @property
    def yellow(self) -> int:
        """The yellow color value. Range: 0.0 to 100.0."""
        return round(self.app.yellow)

    @yellow.setter
    def yellow(self, value: int):
        self.app.yellow = value

black: int property writable

The black color value. Range: 0.0 to 100.0.

cyan: int property writable

The cyan color value. Range: 0.0 to 100.0.

magenta: int property writable

The magenta color value. Range: 0.0 to 100.0.

yellow: int property writable

The yellow color value. Range: 0.0 to 100.0.


Last update: 2024-03-05
Created: 2024-03-05