Swap Fill and Stroke Colors
Script for Adobe Illustrator
ㅤ
Overview
The Swap Fill and Stroke Colors script for Adobe Illustrator provides an intuitive floating panel that enables users to quickly modify fill and stroke colors of multiple selected objects. It includes three core functionalities:
ㅤ
- Swap Fill and Stroke: Interchanges the fill and stroke colors of selected objects.
- Apply Fill to Stroke: Sets the stroke color to match the fill color.
- Apply Stroke to Fill: Sets the fill color to match the stroke color.
ㅤ
This script is particularly useful for designers working with vector graphics, helping streamline color adjustments without navigating Illustrator’s default limited menus.
ㅤ
Installation
- Place the script in your Illustrator Scripts folder:
MacOS: /Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts
Windows: C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts
- Restart Adobe Illustrator to load the script into the File > Scripts menu.
- Go to File > Scripts > Swap Fill and Stroke Colors to launch the script.
ㅤ
Using the Script
Once executed, a floating panel will appear with three main buttons and corresponding icons:
ㅤ

ㅤ
ㅤ
➊ Swap Fill and Stroke
What it does:
Exchanges the fill and stroke colors of all selected objects.
ㅤ


ㅤ
How to use:
- Select one or multiple objects in your Illustrator document.
- Click the “Swap Fill and Stroke” button or the ■ ↔ □ icon.
- The fill and stroke colors will swap instantly.
ㅤ
ㅤ
➋ Apply Fill to Stroke
What it does:
Replaces the stroke color with the fill color.
ㅤ


ㅤ
How to use:
- Select objects whose stroke should match the fill color.
- Click “Apply Fill to Stroke” button or the ■ → □ icon.
- The stroke will adopt the fill color.
ㅤ
ㅤ
➌ Apply Stroke to Fill
What it does:
Replaces the fill color with the stroke color.
ㅤ


ㅤ
How to use:
- Select objects whose fill should match the stroke color.
- Click “Apply Stroke to Fill” or ■ ← □ icon.
- The fill will change to match the stroke color.
ㅤ
ㅤ
➍ Additional Features
ㅤ
- User Guide: Clicking the ⏼ icon opens the official user guide in a web browser.
- Close Button: Users can click ⊗ button to quickly close the panel without needing additional actions.
- Keyboard Shortcut: Press ESC to close the panel.
- Tooltips: Hover over buttons to see descriptions.
ㅤ
Final Notes
This script significantly speeds up color swapping in Illustrator, making it an essential tool for designers who frequently adjust object colors.
ㅤ
ㅤ