document.addTaggedSwatchWithColor()

#### Availability

Animate 2020.

#### Usage

document.addTaggedSwatchWithColor(color:string[,name:string [, index:int [, palette:int ]]])

#### Parameters

color :It is a string that specifies the color for which swatch is created like "#CCFF34".
name : It is an integer that specifies the name of the tagged swatch,it is optional.
index : It is an integer that specifies the index where to add swatch,it is optional.
palette : It is an integer that specifies the index of the tagged swatch palette,default value is 0.It is optional.

#### Returns

Nothing.

#### Description

Method;To add new tagged swatch with the given color string and name at the given index. Name and index are optional,in case no name is given ,adds a unique name by itself and in case no index is given ,adds swatch to end of the tagged swatches. Name is required for index argument.

#### Example
The following example adds new tagged swatch for the color "#FF00FF".

javascript
var document = fl.getDocumentDOM();
document.addTaggedSwatchWithColor("#FF00FF");
#### See also document.addTaggedSwatch() (../Document_object/docu6058.md)