DocumentationDocumentation
Darty.ai
Get Started
Basics
Methods
Colors
UI
Workflows
Darty.ai
Get Started
Basics
Methods
Colors
UI
Workflows
  • Get Started

    • Installation and Login
    • Your First Darty Document
    • Installers - Instructions and Downloads
    • Licensing
  • Basics

    • Darty Basics
    • Darty Header
    • Darty Tags
  • Methods

    • Darty Methods
    • Align
    • Appearance - General
    • Appearance - Colors & Swatches
    • Appearance - Effect Properties
    • Artboard Methods
    • Arrange
    • Attributes
    • Barcode
    • Barcode Formats
    • Clean Document
    • Clipping Mask Make and Release
    • Color Mode
    • Comment
    • Compound Path - Make and Release
    • Distribute
    • Duplicate
    • Expand
    • Fit To Bounds
    • Graphic Style
    • Group & Ungroup
    • Layer Methods
    • Outline
    • Pathfinder
    • Place
    • Rasterize
    • Reduce To Basic Appearance
    • Remove
    • Swatch Methods
    • Tags Methods
    • Template
    • Text
    • Transform Methods
    • zOrder
    • Skip and *
  • Colors

    • Color Libraries
  • User Interface

    • Darty User-Interface
    • Tools Tab
    • Tools Builder
      • Builder Table Anatomy
      • Builder Data Sources and Files
      • Builder Method Blocks
      • Builder Rows, Cells, and Navigation
    • Tools Methods
      • Tools Method Actions and Apply Modes
      • Tools Method Table Preview
      • Align Tool
      • Appearance Tool
      • Graphic Style Tool
      • Artboard Tool
      • Attributes Tool
      • Arrange Tool
      • Barcode Tool
      • Color Mode Tool
      • Clean Tool
      • Clipping Tool
      • Comment Tool
      • Compound Path Tool
      • Distribute Tool
      • Duplicate Tool
      • Expand Tool
      • Fit to Bounds Tool
      • Group Tool
      • Ungroup Tool
      • Layer Tool
      • Outline Tool
      • Pathfinder Tool
      • Place Tool
      • Rasterize Tool
      • Reduce Tool
      • Remove Tool
      • Swatches Tool
      • Tags Tool
      • Text Tool
      • Transform Tool
      • Z-Order Tool
    • Tags Tab
    • Data Tab
    • Export Tab
    • Settings Tab
    • Help Tab
    • Export Settings
    • Export Validation
    • Job Export Settings
    • Export Counter Variables
    • Export Progress
    • Export Presets
    • Recent Files
    • Color Dialog
  • Cloud Data

    • Darty-Ai Cloud Data Integrations
    • Darty-Ai with Google Sheets
  • Workflows

    • Darty Workflows
    • Darty Preview
    • Darty Export Workflows
    • Darty Data Workflows
  • Site Blog

    • ⭐️Getting Started ⭐️
    • ⭐️Placing Images in Darty-Ai ⭐️
    • 🚀 New Features — Darty-Ai 1.7.8 (March 2026)
    • Creating a Basic Pie-Chart with Line-Art & Data
    • Customer Data and Darty-Ai
    • Darty-Ai Now Supports Google Sheets
    • External SVGs with Darty-Ai
    • Preview Your Documents
    • Self-Adjusting Logo Automation
    • State Management for Artwork Appearance
    • Text Replacements and Formatting
    • Using Private Google Sheets Shared with Business Emails
  • Site Pages

    • 🏠 Home
    • 💰 Pricing
    • Downloads
  • Release Notes
  • Downloads

Swatch Methods

Darty's Swatch methods create, update, rename, and merge swatches in the active Illustrator document. They work on document resources rather than tagged artwork, so a Darty tag is not required.

Use Tools → Methods → Swatches to configure Swatch or Merge Swatches and add the resulting method block to Builder. See the Swatches Tool for the visual editor workflow.

See the Swatches Tool for the visual Swatch and Merge Swatches editors.

Available Methods

MethodPurposeTools editor
swatchCreate a swatch, edit an existing swatch, or rename the swatch selected by name or number.Swatch
mergeSwatchesRecolor artwork from source swatches to a target swatch, then remove the merged source swatches.Merge Swatches

Method names are normalized when the sheet is processed, so the lowercase form mergeswatches is also accepted.

Create or Edit a Swatch

The swatch method locates a document swatch by swatchName or swatchNumber. If a named swatch does not exist, Darty creates it from the supplied color definition. If it already exists, Darty updates the properties supplied by that data row.

Editing a global or spot swatch can change the appearance of every Illustrator object that uses it. Test edits on a copy of the document when the swatch is already in production artwork.

Identity Properties

PropertyDescription
swatchName / name 
Name of the swatch to create or edit. Supply this or swatchNumber. Names containing spaces should be quoted when they appear inside a combined color value.
swatchNumber 
Numeric document swatch index used as an alternative to swatchName. A name is usually more stable when swatches may be reordered.
newName 
New name for the located or newly created swatch. Leave it blank to keep the current name.
library / swatchLibrary 
Optional swatch-library name passed to the swatch lookup. This property is accepted in manually authored sheets but is not currently shown in the Tools editor.
skip 
Skips this method for the current data row. See * and Skip. Valid Values: true, false.

At least one of swatchName or swatchNumber is required. Avoid relying on swatchNumber when other rows or users may add, remove, or reorder document swatches.

Color Definition

You can provide the complete color in color, or split the definition across colorSpace and the channel properties. The Tools color control writes the same properties that a spreadsheet can use directly.

PropertyDescription
color 
Combined color definition. Include a color model when the value would otherwise be ambiguous. Examples: rgb 18 128 74, cmyk 86 0 42 50, lab 48 -42 19, grayscale 35.
rgb 
RGB color values without repeating the model in the data cell. Example: 18 128 74.
cmyk 
CMYK color values without repeating the model in the data cell. Example: 86 0 42 50.
lab 
Lab color values without repeating the model in the data cell. Example: 48 -42 19.
colorSpace / colorMode 
Color model used to interpret channel values. Valid Values: RGB, CMYK, Lab, Gray, Grayscale.
destColorSpace / destColorMode 
Optional Illustrator color space for the stored result when it should differ from the input color space. Valid Values: RGB, CMYK, Lab, Gray, Grayscale.
channel1 / color1 / c1 
RGB red, CMYK cyan, Lab lightness, or grayscale value. Model-specific aliases such as red, r, cyan, c, gray, grey, and l are also accepted.
channel2 / color2 / c2 
RGB green, CMYK magenta, or Lab a value. Aliases include green, g, magenta, m, and a.
channel3 / color3 / c3 
RGB blue, CMYK yellow, or Lab b value. Aliases include blue, b, yellow, and y.
channel4 / color4 / c4 
CMYK black value. Aliases: black, k. It is not used by RGB, Lab, or grayscale colors.

Use these channel ranges:

  • RGB: red, green, and blue from 0 to 255.
  • CMYK: cyan, magenta, yellow, and black from 0 to 100.
  • Lab: L from 0 to 100; a and b from -128 to 127.
  • Grayscale: one gray value from 0 to 100.

For the complete combined-value syntax, named colors, hex values, and quoting rules, see Appearance - Colors & Swatches.

Process, Global, Spot, and Tint

PropertyDescription
spot 
Sets the Illustrator color type. Use true for a spot swatch or false for a process swatch.
global 
Makes a process swatch global when true. Artwork using a global swatch updates when that swatch is edited. Valid Values: true, false.
tint / customColorTint 
Tint percentage for a spot or global color. Valid Values: 0 to 100.
type 
Combined color-type value accepted in manually authored sheets. Valid Values: spot, global, process, none. The Tools editor writes spot and global separately.

When editing an existing swatch, omit classification properties that you do not intend to change. For example, updating only its color channels does not require you to restate whether it is spot, process, or global.

Merge Swatches

mergeSwatches replaces the use of each source swatch with the target swatch, then removes the merged source swatches from the document. This is useful for consolidating duplicate brand colors or normalizing imported artwork.

PropertyDescription
target 
Name of the swatch that should remain after the merge. Set it explicitly so the intended destination is unambiguous.
swatches 
Required list of source swatch names to recolor and remove. The Tools editor accepts the names in its Source Swatches field.
skip 
Skips this method for the current data row. See * and Skip. Valid Values: true, false.

Check that target names an existing document swatch and that it is not accidentally repeated in the source list. Swatch names are document resources; no artwork tag is needed in the Darty header.

Rename With the Swatch Method

In the Swatch Tools editor, identify the existing swatch with swatchName or swatchNumber and enter newName. Leave the color, classification, and tint properties unset when the name is the only value that should change.

PropertyDescription
swatchName / name 
Current name of the swatch to rename. Supply this or swatchNumber.
swatchNumber 
Document index of the swatch to rename when its name is not used.
newName 
New name for that swatch.
skip 
Skips this method for the current data row. See * and Skip. Valid Values: true, false.

Sample Spreadsheets

Create Global Process Swatches

This creates two reusable global RGB swatches.

*
swatch
swatchNamecolorspotglobaltint
Swatch nameColorSpotGlobalTint
Brand Green rgb 18 128 74falsetrue100
Brand Blue rgb 38 92 180falsetrue100

Create CMYK Spot Swatches

*
swatch
swatchNamecolorSpacechannel1channel2channel3channel4spot
Swatch nameModelCyanMagentaYellowBlackSpot
Packaging Orange cmyk058920true
Packaging Blue cmyk824800true

The color markers are approximate RGB previews for the browser. The spreadsheet values remain CMYK, and Illustrator's document color profile can produce a slightly different on-screen result.

Edit and Rename Existing Swatches

These rows change the RGB values of two existing swatches and rename them for the 2026 palette.

*
swatch
swatchNamecolornewName
Existing nameUpdated colorNew name
Brand Green rgb 10 142 82Brand Green 2026
Brand Blue rgb 30 104 196Brand Blue 2026

Merge Duplicate Swatches

This recolors uses of Bright Green and Imported Green to Brand Green, then removes the two source swatches.

*
mergeSwatches
targetswatches
Target swatchSource swatches
Brand GreenBright Green, Imported Green
Brand BlueLegacy Blue, Imported Blue

Practical Workflow

  1. Create or confirm the target brand swatches before merging imported colors.
  2. Prefer stable swatch names over numeric indexes in reusable sheets.
  3. Use spot: false with global: true for a global process swatch; use spot: true for a spot swatch.
  4. Inspect Illustrator's Swatches panel after creating or editing spot and global colors.
  5. Before merging, save a copy of the document and confirm that the target and source names are exact.

Related Documentation

  • Swatches Tool
  • Tools Methods Overview
  • Appearance - Colors & Swatches
  • Appearance - General
  • * and Skip
Last Updated: 7/26/26, 8:19 AM
Contributors: Trevor, Vasily Hall
Prev
Remove
Next
Tags Methods