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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Color related Commands</title>
</head>
<style>
@import "manual.css";
</style>
<body>
<h2>Color related Commands</h2>
<dl>
<dt><a name="-changeColor"><strong>changeColor</strong></a>(...)</dt>
<dd><code>changeColor("name", c, m, y, k)</code>
<p>Changes the color "name" to the specified CMYK value. The color value is defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255.</p>
<p>Note : deprecated, use changeColorCMYK() instead</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-changeColorCMYK"><strong>changeColorCMYK</strong></a>(...)</dt>
<dd><code>changeColorCMYK("name", c, m, y, k)</code>
<p>Changes the color "name" to the specified CMYK value. The color value is defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255.</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-changeColorCMYKFloat"><strong>changeColorCMYKFloat</strong></a>(...)</dt>
<dd><code>changeColorCMYKFloat("name", c, m, y, k)</code>
<p>Changes the color "name" to the specified CMYK value. The color value is defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black. Color components are floating point values between 0 and 100.</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-changeColorLab"><strong>changeColorLab</strong></a>(...)</dt>
<dd><code>changeColorLab("name", L, a, b)</code>
<p>Changes the color \"name\" to the specified CIELab values. The color value is defined via three components: L = luminosity, a = green/red, b = blue/yellow. Color components are floating point values with L between 0 and 100, a and b between -128 and 128.</p>
<p>Note : deprecated, use changeColorCMYK() instead</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-changeColorRGB"><strong>changeColorRGB</strong></a>(...)</dt>
<dd><code>changeColorRGB("name", r, g, b)</code>
<p>Changes the color "name" to the specified RGB value. The color value is defined via three components r = red, g = green, b = blue. Color components should be in the range from 0 to 255.</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-changeColorRGBFloat"><strong>changeColorRGBFloat</strong></a>(...)</dt>
<dd><code>changeColorRGBFloat("name", r, g, b)</code>
<p>Changes the color "name" to the specified RGB value. The color value is defined via three components r = red, g = green, b = blue. Color components are floating point values between 0 and 255.</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-defineColor"><strong>defineColor</strong></a>(...)</dt>
<dd><code>defineColor("name", c, m, y, k)</code>
<p>Defines a new color "name". The color Value is defined via three components: c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255.</p>
<p>Note : deprecated, use defineColorCMYK() instead.</p>
<p>May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-defineColorCMYK"><strong>defineColorCMYK</strong></a>(...)</dt>
<dd><code>defineColorCMYK("name", c, m, y, k)</code>
<p>Defines a new color "name". The color Value is defined via three components: c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255.</p>
<p>May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-defineColorCMYKFloat"><strong>defineColorCMYKFloat</strong></a>(...)</dt>
<dd><code>defineColorCMYKFloat("name", c, m, y, k)</code>
<p>Defines a new color "name". The color Value is defined via three components: c = Cyan, m = Magenta, y = Yellow and k = Black. Color components are floating point values between 0 and 100.</p>
<p>May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-defineColorLab"><strong>defineColorLab</strong></a>(...)</dt>
<dd><code>defineColorLab("name", L, a,b)</code>
<p>Defines a new color \"name\" using CIELab values. The color value is defined via three components: L = luminosity, a = green/red, b = blue/yellow. Color components are floating point values with L between 0 and 100, a and b between -128 and 128.</p>
<p>May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-defineColorRGB"><strong>defineColorRGB</strong></a>(...)</dt>
<dd><code>defineColorRGB("name", r, g, b)</code>
<p>Defines a new color "name". The color Value is defined via three components: r = red, g = green, b = blue. Color components should be in the range from 0 to 255.</p>
<p>May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-defineColorRGBFloat"><strong>defineColorRGBFloat</strong></a>(...)</dt>
<dd><code>defineColorRGBFloat("name", r, g, b)</code>
<p>Defines a new color "name". The color Value is defined via three components: r = red, g = green, b = blue. Color components are floating point values between 0 and 255.</p>
<p>May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-deleteColor"><strong>deleteColor</strong></a>(...)</dt>
<dd><code>deleteColor("name", "replace")</code>
<p>Deletes the color "name". Every occurrence of that color is replaced by the color "replace". If not specified, "replace" defaults to the color "None" - transparent.</p>
<p>deleteColor works on the default document colors if there is no document open. In that case, "replace", if specified, has no effect.</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if a named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-getColor"><strong>getColor</strong></a>(...)</dt>
<dd><code>getColor("name") -> tuple</code>
<p>Returns a tuple (C, M, Y, K) containing the four color components of the color "name" from the current document. If no document is open, returns the value of the named color from the default document colors.</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-getColorFloat"><strong>getColorFloat</strong></a>(...)</dt>
<dd><code>getColorFloat("name") -> tuple</code>
<p>Returns a tuple (C, M, Y, K) containing the four color components of the color "name" from the current document. Color components are floating point values between 0 and 100. If no document is open, returns the value of the named color from the default document colors.</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-getColorAsRGB"><strong>getColorAsRGB</strong>(...)</a></dt>
<dd><code>getColorAsRGB("name") -> tuple</code>
<p>Returns a tuple (R,G,B) containing the three color components of the color "name" from the current document, converted to the RGB color space. If no document is open, returns the value of the named color from the default document colors.</p>
<p>May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-getColorAsRGBFloat"><strong>getColorAsRGBFloat</strong>(...)</a></dt>
<dd><code>getColorAsRGBFloat("name") -> tuple</code>
<p>Returns a tuple (R,G,B) containing the three color components of the color "name" from the current document, converted to the RGB color space. Color components are floating point values between 0 and 255. If no document is open, returns the value of the named color from the default document colors.</p>
<p>May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-getColorNames"><strong>getColorNames</strong></a>(...)</dt>
<dd><code>getColorNames() -> list</code>
<p>Returns a list containing the names of all defined colors in the document. If no document is open, returns a list of the default document colors.</p></dd>
<dt><a name="-isSpotColor"><strong>isSpotColor</strong></a>(...)</dt>
<dd><code>isSpotColor("name") -> bool</code>
<p>Returns True if the color "name" is a spot color.</p>
<p>See also setSpotColor()</p>
<p>May raise NotFoundError if a named color wasn't found.</p>
<p>May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-replaceColor"><strong>replaceColor</strong></a>(...)</dt>
<dd><code>replaceColor("name", "replace")</code>
<p>Every occurrence of the color "name" is replaced by the color "replace".</p>
<p>May raise <a href="scripterapi.html#NotFoundError">NotFoundError</a> if a named color wasn't found. May raise ValueError if an invalid color name is specified.</p></dd>
<dt><a name="-setSpotColor"><strong>setSpotColor</strong></a>(...)</dt>
<dd><code>setSpotColor("name", spot)</code>
<p>Set the color "name" as a spot color if spot parameter is True.</p>
<p>See also isSpotColor().</p>
<p>May raise NotFoundError if a named color wasn't found.</p>
<p>May raise ValueError if an invalid color name is specified.</p></dd>
</dl>
</body>
</html>
|