SetColorStyle Color Command

SETCOLORSTYLE Color Commands

Sets the color style tag for the selected object(s) or text, as specified. If no objects or text is selected, it sets the color style for future objects or text.

setcolorstyle [ALL | FILL | STROKENUMBER number] [COLORNUMBER number] [what] [DOCUMENT name | WINDOW name | OBJECTID number | STYLETAG name]

color/s The color style to set.

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 --unknown--

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. This format is used to allow future expansion. Default=0.

Examples:

setcolorstyle 'NeonPink'

setcolorstyle 'Orange' all text

setcolorstyle 'Red' strokenumber 2

setcolorstyle 'Blue' colornumber 1 object

 

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

User Contributed Comments For SetColorStyle
Tim Doty wrote...2006-04-25 04:57:48

From my notes:
Quote:


This command has no effect* when called unless it is sandwiched between BeginStyleTag() and EndStyleTag().

*actually it does, but only after the document has been saved and reopened.

Examples
Code:


# no error, but the command has no effect
print SetColorStyle('Red','Text','StyleTag','MyNewStyle')
{'.error': 1, '.result': 0}
#
BeginStyleTag()
SetColorStyle("Brown","ColorNumber",0,"Fill","Text")
EndStyleTag()

Dan Kilroy wrote...2006-05-03 15:55:37

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

Gets the {...} .

SetColorStyle (tagname [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 SetColorStyle