SetColor Color Command

SETCOLOR Color Commands

Sets the color for an object or text, or for a style tag. If object or text is chosen and nothing is selected, it sets the color for future objects or text, as applicable.

setcolor [TINT value] [method] [type] [ALL | FILL | STROKENUMBER number] [COLORNUMBER number] [what] [DOCUMENT name | WINDOW name | OBJECTID number | STYLETAG name]

TINT/d The tint percentage.

method/k The print method.

Options: KNOCKOUT Knocks out the background.
OVERPRINT Prints over the background.

type/k The color type.

Options: PROCESS A process (separable) color.
SPOT A spot (mechanical) color.
BLACK Sets the color to black.
WHITE Sets the color to white.
GRAY/d Sets the color to a grayscale.
RGB/d Defines a RGB color.
CMYK/d Defines a CMYK color.
PANTONE/s Selects a PANTONE color.
HLS/d Defines an HLS color.
HSV/d Defines an HSV color.

ALL Sets the fill and stroke. Default.

FILL Sets the fill only.

STROKENUMBER/i Sets a stroke only. See notes.

COLORNUMBER Sets a gradient's TO color. what/k Specifies what to set.

Options: OBJECT The object. Default.
TEXT The text.
SHADOW The text shadow.
REVERSE The text reverse.
UNDERLINE The text underline.
OUTLINE The text outline.

DOCUMENT/s The document name. Default=current.

WINDOW/s The window name. Default=current.

OBJECTID/i The number of the object to manipulate. Default=current.

STYLETAG/s Sets the attribute for a style tag.

Notes:

STROKENUMBER: Strokes are numbered from 0. This is different than the program interface which numbers them from 1.

COLORNUMBER: If Basic fills are used, or if you are setting stroke color, the color number is always 0 and does not need to be specified. This is used for gradient, radial and shape fills. Color number 0 is the From color and 1 is the To color.

TINT: This parameter is equivalent to the Tint control in the Edit Color dialog box, and not the Tint controls in the Line & Fill dialog box.

Examples:

setcolor black

setcolor tint 50 PANTONE 'PANTONE 120 CV' ยจ
strokenumber 1 object

setcolor cmyk 25 43 0 12 shadow

 

SetColor  Command Definition  url:PGScmd/setcolor
  created:2006-03-31 10:52:53   last updated:2006-03-31 10:52:53
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For SetColor
Dan Kilroy wrote...2006-06-06 19:47:18

Script command submitted from PageStream internal documentation. Needs to be checked and merged with the command documentation above.

Sets the {...} .

SetColor ([TINT percent] [KNOCKOUT | OVERPRINT] [PROCESS | SPOT] <BLACK | WHITE | GRAY black | CMYK cyan magenta yellow black | RGB red green blue | HLS hue lightness saturation | HSV hue saturation value | LIBRARY libname colornum | TRUMATCH ? | FOCALTONE ? | YCC ? ? ? | CIE ? ? ? | YIQ y? i? q? [ALL | FILL | STROKENUMBER n] [COLORNUMBER n] [OBJECT | TEXT | SHADOW | OUTLINE | REVERSE | UNDERLINE | PGS40: RULEABOVE|RULEBELOW PGS41: CELLFILL|CELLTOP|CELLBOTTOM|CELLLEFT|CELLRIGHT PGS50: DROPCAP|BULLET|NUMBERED [DOCUMENT document | WINDOW document-window | ID id | STYLETAG document:...-tagname]

Parameters:


Results:


Notes:
BULLET, DROPCAP, and NUMBERED parameters first available in 5.0.3.2.


See Also:
Filled, SetColor, SetColorBlend, SetColorCount, SetColorStyle, SetColorTint, SetFill, SetFPattern, SetFPatternStyle, SetScreen, SetStroke, SetStrokeBegin, SetStrokeCap, SetStrokeCount, SetStrokeEnd, SetStrokeJoin, SetStrokeOffset, SetStrokeStyle, SetStrokeWeight, SetTrapping, Stroked


Examples:
Python:


ARexx:

Applescript:

User Contributed Comments For SetColor