document.addTaggedSwatch()
#### Availability
Animate 2020.
#### Usage
document.addTaggedSwatch(swatch:object [,index:int [,palette:int ]] )
#### Parameters
swatch : swatch object to add.
index : An integer that specifies the index where to add swatch.It is optional.
palette :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 swatch object at the given index, index is optional,in case no index is given adds swatch to end of the tagged swatches.
#### Example
In the following example,adding new tagged swatch,swatch1 to end of the tagged swatches.
javascript
var document = fl.getDocumentDOM();
var swatch1 = new Object();
var fill = fl.getDocumentDOM().getCustomFill();
fill.color = "#FF00FF";
fill.style = "solid";
swatch1.fill = fill;
swatch1.name = "solid_swatch";
document.addTaggedSwatch(swatch1);
#### See also
document.addTaggedSwatchWithColor() (../Document_object/docu6059.md)