Color Randomizer
Script for Adobe Illustrator
ㅤ
Overview
Color Randomizer script allows you to randomly vary the colors of selected objects in Adobe Illustrator while maintaining control over how the colors change. It's particularly useful for creating variations in designs, generating color alternatives, or adding subtle randomness to your artwork.
ㅤ
Key Features
1. Three Randomization Modes:
- Hue: Shifts colors around the color wheel while maintaining saturation and lightness.
- Saturation: Adjusts the intensity of colors while keeping the same hue.
- Lightness: Changes the brightness of colors while preserving the hue.
2. Separate Controls for Fill and Stroke:
- Adjustable variation amount (1-100%) for both fill and stroke colors.
- Real-time preview of changes.
- Handles gradient and spot color fill and stroke.
3. Advanced Compatibility:
- Works with single objects and groups.
- Supports text objects.
- Compatible with RGB, CMYK, and grayscale colors.
ㅤ
Installation
1. Download the Script:
- Save the Color Randomizer.jsx file to your computer.
2. Place in Scripts Folder:
- For Mac: Copy the file to
/Applications/Adobe Illustrator [Version]/Presets/<Language>/Scripts/ - For Windows: Copy the file to
C:\Program Files\Adobe\Adobe Illustrator [Version]\Presets\<Language>\Scripts\
3. Restart Illustrator:
- If Illustrator was running during installation, restart it to recognize the new script.
ㅤ
Using the script
- Launch the Script: Go to File > Scripts > Color Randomizer
- Configure Randomization Settings: The dialog box offers the following options:
ㅤ

ㅤ
ㅤ
➊ Randomization Mode
ㅤ
Choose a randomization mode using a dropdown menu with three options:
- Hue: Shifts colors around the color wheel (e.g., red might become orange or purple).
- Saturation: Adjusts color intensity (e.g., vibrant red to muted red).
- Lightness: Changes brightness (e.g., dark red to light red).
ㅤ
- Affects both fill and stroke colors when enabled.
- Changes update in real-time when switching modes.
ㅤ



ㅤ
ㅤ
➋ Fill Color
ㅤ
Controls randomization of object fill colors.
- Checkbox: Enables/disables fill color randomization.
- Slider: Adjusts variation amount from 1-100%.
- Input field: Shows current variation value.
ㅤ
- Slider and input field are disabled until checkbox is checked.
- Changes preview immediately when adjusting values.
- Use up/down arrow keys to fine-tune values.
- Hold Shift while using arrow keys for larger increments.
ㅤ
ㅤ
➌ Stroke Color
ㅤ
Controls randomization of object stroke colors:
- Checkbox: Enables/disables stroke color randomization.
- Slider: Controls variation amount (1-100%).
- Input field: Displays/accepts numerical values.
ㅤ
- Controls remain disabled until checkbox is checked.
- Updates preview in real-time.
ㅤ
Additional Notes:
- The variation percentage determines the maximum possible change from the original color.
- Lower values (closer to 1%) create subtle variations.
- Higher values (closer to 100%) create more dramatic changes.
- Spot colors and global colors are converted to their base color type for randomization.
- Gradient stops are individually randomized while maintaining their positions.
ㅤ
ㅤ
➍ Buttons
ㅤ
OK Button:
- Applies the current randomization permanently.
- Closes the dialog.
- Cannot be undone (except with Edit > Undo).
ㅤ
Cancel Button:
- Reverts all changes to original colors.
- Closes the dialog without applying changes.
- Useful if you don't like the preview results.
ㅤ
For best results:
- Start with small variation values (5-15%) for subtle changes.
- Use the Hue mode for exploring different color schemes while maintaining the overall feel.
- Preview different settings before committing to find the perfect balance.
- Remember you can always use Edit > Undo if you want to try another variation after applying.
ㅤ
Limitations:
⚠︎ The script does not apply adjustments to:
✖ Raster Images.
✖ Pattern Swatches.
✖ Effects/Appearances.
✖ Freeform Gradients.
✖ Gradient Meshes
ㅤ
Tip: Click the icon ⏼ in the bottom right corner to access the user guide.
ㅤ
ㅤ
The Color Randomizer script offers a powerful yet controlled approach to color experimentation in Adobe Illustrator. Whether you're exploring design variations, creating dynamic patterns, or simply looking for color inspiration, this tool provides the perfect balance between randomness and control.
ㅤ
ㅤ