16 PyDoc_STRVAR(scribus_colornames__doc__,
17 QT_TR_NOOP(
"getColorNames() -> list\n\
19 Returns a list containing the names of all defined colors in the document.\n\
20 If no document is open, returns a list of the default document colors.\n\
23 PyObject *scribus_colornames(PyObject * );
26 PyDoc_STRVAR(scribus_getcolor__doc__,
27 QT_TR_NOOP(
"getColor(\"name\") -> tuple\n\
29 Returns a tuple (C, M, Y, K) containing the four color components of the\n\
30 color \"name\" from the current document. If no document is open, returns\n\
31 the value of the named color from the default document colors.\n\
33 May raise NotFoundError if the named color wasn't found.\n\
34 May raise ValueError if an invalid color name is specified.\n\
37 PyObject *scribus_getcolor(PyObject * , PyObject* args);
40 PyDoc_STRVAR(scribus_getcolorasrgb__doc__,
41 QT_TR_NOOP(
"getColorAsRGB(\"name\") -> tuple\n\
43 Returns a tuple (R,G,B) containing the three color components of the\n\
44 color \"name\" from the current document, converted to the RGB color\n\
45 space. If no document is open, returns the value of the named color\n\
46 from the default document colors.\n\
48 May raise NotFoundError if the named color wasn't found.\n\
49 May raise ValueError if an invalid color name is specified.\n\
52 PyObject *scribus_getcolorasrgb(PyObject * , PyObject* args);
55 PyDoc_STRVAR(scribus_setcolor__doc__,
56 QT_TR_NOOP(
"changeColor(\"name\", c, m, y, k)\n\
58 Changes the color \"name\" to the specified CMYK value. The color value is\n\
59 defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black.\n\
60 Color components should be in the range from 0 to 255.\n\
61 Note : deprecated, use changeColorCMYK() instead.\n\
63 May raise NotFoundError if the named color wasn't found.\n\
64 May raise ValueError if an invalid color name is specified.\n\
67 PyObject *scribus_setcolor(PyObject * , PyObject* args);
70 PyDoc_STRVAR(scribus_setcolorcmyk__doc__,
71 QT_TR_NOOP(
"changeColorCMYK(\"name\", c, m, y, k)\n\
73 Changes the color \"name\" to the specified CMYK value. The color value is\n\
74 defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black.\n\
75 Color components should be in the range from 0 to 255.\n\
77 May raise NotFoundError if the named color wasn't found.\n\
78 May raise ValueError if an invalid color name is specified.\n\
81 PyObject *scribus_setcolorcmyk(PyObject * , PyObject* args);
84 PyDoc_STRVAR(scribus_setcolorrgb__doc__,
85 QT_TR_NOOP(
"changeColorRGB(\"name\", r, g, b)\n\
87 Changes the color \"name\" to the specified RGB value. The color value is\n\
88 defined via three components r = red, g = green, b = blue.\n\
89 Color components should be in the range from 0 to 255.\n\
91 May raise NotFoundError if the named color wasn't found.\n\
92 May raise ValueError if an invalid color name is specified.\n\
95 PyObject *scribus_setcolorrgb(PyObject * , PyObject* args);
98 PyDoc_STRVAR(scribus_newcolor__doc__,
99 QT_TR_NOOP(
"defineColor(\"name\", c, m, y, k)\n\
101 Defines a new color \"name\". The color Value is defined via four components:\n\
102 c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in\n\
103 the range from 0 to 255.\n\
104 Note : deprecated, use defineColorCMYK() instead.\n\
106 May raise ValueError if an invalid color name is specified.\n\
109 PyObject *scribus_newcolor(PyObject * , PyObject* args);
112 PyDoc_STRVAR(scribus_newcolorcmyk__doc__,
113 QT_TR_NOOP(
"defineColorCMYK(\"name\", c, m, y, k)\n\
115 Defines a new color \"name\". The color Value is defined via four components:\n\
116 c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in\n\
117 the range from 0 to 255.\n\
119 May raise ValueError if an invalid color name is specified.\n\
122 PyObject *scribus_newcolorcmyk(PyObject * , PyObject* args);
125 PyDoc_STRVAR(scribus_newcolorrgb__doc__,
126 QT_TR_NOOP(
"defineColorRGB(\"name\", r, g, b)\n\
128 Defines a new color \"name\". The color Value is defined via three components:\n\
129 r = red, g = green, b = blue. Color components should be in\n\
130 the range from 0 to 255.\n\
132 May raise ValueError if an invalid color name is specified.\n\
135 PyObject *scribus_newcolorrgb(PyObject * , PyObject* args);
138 PyDoc_STRVAR(scribus_delcolor__doc__,
139 QT_TR_NOOP(
"deleteColor(\"name\", \"replace\")\n\
141 Deletes the color \"name\". Every occurence of that color is replaced by the\n\
142 color \"replace\". If not specified, \"replace\" defaults to the color\n\
143 \"None\" - transparent.\n\
145 deleteColor works on the default document colors if there is no document open.\n\
146 In that case, \"replace\", if specified, has no effect.\n\
148 May raise NotFoundError if a named color wasn't found.\n\
149 May raise ValueError if an invalid color name is specified.\n\
152 PyObject *scribus_delcolor(PyObject * , PyObject* args);
155 PyDoc_STRVAR(scribus_replcolor__doc__,
156 QT_TR_NOOP(
"replaceColor(\"name\", \"replace\")\n\
158 Every occurence of the color \"name\" is replaced by the color \"replace\".\n\
160 May raise NotFoundError if a named color wasn't found.\n\
161 May raise ValueError if an invalid color name is specified.\n\
164 PyObject *scribus_replcolor(PyObject * , PyObject* args);
168 PyDoc_STRVAR(scribus_isspotcolor__doc__,
169 QT_TR_NOOP(
"isSpotColor(\"name\") -> bool\n\
171 Returns True if the color \"name\" is a spot color.\n\
172 See also setSpotColor()\n\
174 May raise NotFoundError if a named color wasn't found.\n\
175 May raise ValueError if an invalid color name is specified.\n\
178 PyObject *scribus_isspotcolor(PyObject * , PyObject* args);
183 PyDoc_STRVAR(scribus_setspotcolor__doc__,
184 QT_TR_NOOP(
"setSpotColor(\"name\", spot)\n\
186 Set the color \"name\" as a spot color if spot parameter is True.\n\
187 See also isSpotColor()\n\
189 May raise NotFoundError if a named color wasn't found.\n\
190 May raise ValueError if an invalid color name is specified.\n\
193 PyObject *scribus_setspotcolor(PyObject * , PyObject* args);