%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
createNewColor Method
See Also 
vdWebLibrary Namespace > vdConst Class : createNewColor Method
Parameter
A string parameter that defines what kind of vdColor object will be created. There are four possible vdColors you can create. 1. For an RGBA color object simply pass the four values seperated by comma in a single string ("255,100,0,255"). 2. To use one of the colors in the pallette, simply insert a number up to 254 ("134"). 3. To use the layer's color insert the bylayer string ("bylayer"). 4. Finally to use the byblock color type insert a byblock string ("byblock").
Creates a new vdColor object.

Syntax

JScript 
public function createNewColor( 
   Parameter : String
) : Object;

Parameters

Parameter
A string parameter that defines what kind of vdColor object will be created. There are four possible vdColors you can create. 1. For an RGBA color object simply pass the four values seperated by comma in a single string ("255,100,0,255"). 2. To use one of the colors in the pallette, simply insert a number up to 254 ("134"). 3. To use the layer's color insert the bylayer string ("bylayer"). 4. Finally to use the byblock color type insert a byblock string ("byblock").

Return Value

The created color or a "bylayer" color as default.

Remarks

It is the same as colorFromString

See Also