Solid Color to Gradient
Script for Adobe Illustrator
✦ Available exclusively on Patreon for Pro supporters.
ㅤ
Description
Solid Color to Gradient automates the process of converting flat fills into gradient fills while maintaining precise control over the gradient appearance. The script features an intuitive interface with real-time preview, allowing you to fine-tune gradient parameters including shift amount, angle, midpoint, and individual color stop adjustments using both HSB and RGB color models.
ㅤ
Key Features
- Live Preview: See changes in real-time as you adjust parameters
- Dual Gradient Types: Create linear or radial gradients
- Advanced Color Control: Adjust gradient stops using HSB (Hue, Saturation, Brightness) or RGB channels
- Smart Color Handling: Supports RGB, CMYK, Grayscale, and Spot color fills
- Flexible Adjustments: Control gradient shift, angle, and midpoint with sliders and numeric inputs
- Batch Processing: Convert multiple selected objects simultaneously
- Non-Destructive Preview: Revert changes before applying
ㅤ

ㅤ
Installation
1. Download the Solid Color to Gradient.jsx script file.
2. Place the script in your Adobe Illustrator Scripts folder:
⮑ Mac: /Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts
⮑ Windows: C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts
3. Restart Adobe Illustrator if it's already running.
4. Alternatively, run it directly via File > Scripts > Other Script... and browse to the file location; or just drag and drop the Solid Color to Gradient.jsx file onto your Illustrator document window.
ㅤ
Using the Script
ㅤ
Prepare Your Document
- Open an Adobe Illustrator document
- Select one or more objects with solid color fills:
- Supported: RGB, CMYK, Grayscale, or Spot colors
- Not supported: Existing gradients, patterns, or objects without fills
ㅤ
Launch the Script
- Go to File > Scripts > Solid Color to Gradient
- The script dialog will appear with all controls:
ㅤ

ㅤ
➊ Choose Gradient Type
Select the gradient style:
- Linear: Creates a straight-line gradient transition
- Radial: Creates a circular gradient radiating from the center
➋ Adjust Gradient Shift
The Gradient Shift controls how much the start and end colors deviate from the original color:
- Use the slider for quick adjustments (0-255 for RGB, 0-100 for CMYK/Gray)
- Enter a numeric value in the text field
- Use arrow keys (↑/↓) for fine control (hold Shift for larger steps)
- Click the ✖ button to reset to default (20)
Tip: Higher values create more contrast between gradient stops.
➌ Set Gradient Angle (Linear Only)
For linear gradients, control the rotation angle:
- Adjust the slider or enter a value (-360° to 360°)
- 0° = horizontal gradient
- 90° = vertical gradient
- Negative values rotate counter-clockwise
- Click ✖ to reset to 0°
Note: This control is disabled for radial gradients.
➍ Adjust Gradient Midpoint
Control where the gradient transition occurs between colors:
- Range: 13% to 87%
- 50% = even transition (default)
- Lower values shift transition toward the start color
- Higher values shift transition toward the end color
- Click ✖ to reset to 50%
Fine-Tune Color Stops (Optional)
Adjust the first and last gradient stops independently using HSB or RGB controls:
ㅤ
➎ First Stop Adjustments
Navigate to the "Adjust First Stop" panel:
HSB Tab:
- H (Hue): -180° to 180° (shifts color around the color wheel)
- S (Saturation): -100% to 100% (makes color more/less vibrant)
- B (Brightness): -100% to 100% (makes color lighter/darker)
ㅤ
RGB Tab:
- R (Red): -255 to 255 (RGB) or -100 to 100 (CMYK)
- G (Green): -255 to 255 (RGB) or -100 to 100 (CMYK)
- B (Blue): -255 to 255 (RGB) or -100 to 100 (CMYK)
➏ Last Stop Adjustments
Navigate to the "Adjust Last Stop" panel with identical HSB/RGB controls.
ㅤ
Tips:
- All adjustments have sliders, text fields, and reset buttons (✖)
- Use arrow keys in text fields for precise control
- Right-click (or Ctrl+Click on Mac) on any slider to reset it
- Changes apply in real-time when Preview is enabled
➐ Use Preview and Helper Tools
-
Preview checkbox: Toggle live preview on/off (enabled by default)
• When checked: See changes instantly
• When unchecked: Revert to original colors while adjusting - Hide Edges checkbox: Toggle object edge visibility for clearer preview
- Zoom button: Quickly zoom to fit your selection in the window
➑ Apply or Cancel
- OK button (or press Enter): Apply the gradient conversion permanently
- Cancel button (or press Esc): Discard changes and close the dialog
ㅤ
Keyboard Shortcuts
- Enter: Apply changes (OK)
- Esc: Cancel and close
- ↑/↓ arrows: Increment/decrement values in text fields
- Shift + ↑/↓: Larger increments (10 units)
- Right-click on slider: Reset to default value
ㅤ
Best Practices
- Start with Preview enabled to see changes in real-time
- Use Hide Edges for a clearer view of gradient effects
- Adjust Gradient Shift first to establish overall contrast
- Fine-tune with HSB controls for color harmony
- Use RGB controls for precise channel adjustments
- Zoom to selection when working with small objects
☻ Wrap-Up
You now have complete control over converting solid colors into beautiful, customizable gradients. The script's live preview and extensive adjustment options let you experiment freely until you achieve the perfect look.
Whether you're adding subtle depth to flat designs or creating dramatic lighting effects, the combination of gradient shift, angle control, midpoint adjustment, and individual color stop fine-tuning gives you professional results in seconds.
ㅤ
ㅤ