Skip to main content
Known Participant
June 22, 2026
Answered

Make gradient stops evenly spaced

  • June 22, 2026
  • 2 replies
  • 5 views

In the gradient panel in illustrator it would be extremely beneficial to have an option that makes all your stops evenly spaced. 

Correct answer Anubhav M

Hello ​@Rachel38744444mgd4 

 

That is a great idea. Would you mind creating a UserVoice for this feature request (https://illustrator.uservoice.com/) and adding your comments there? Doing this will help us prioritize this request, and you will be notified of any updates.
 
Feel free to reach out if you have more questions or need assistance. We'd be happy to help.
Anubhav

2 replies

jduncan
Community Expert
Community Expert
June 26, 2026

Just throwing this out there for reference... I had a hacky script that does basically what you are asking so I cleaned it up for posting here. It is not built-in or perfect and it doesn’t cover some edge cases but it works great for simple tasks. Cheers!

/*
EqualizeGradientStops.jsx for Adobe Illustrator
-----------------------------------------------
Evenly distributes the gradient stops of selected objects between the first and last stop.

Created in response to this question on the Adobe forum:
https://community.adobe.com/questions-652/make-gradient-stops-evenly-spaced-1629107

Related Docs:
* Gradients - https://ai-scripting.docsforadobe.dev/jsobjref/Gradients/
* Gradient - https://ai-scripting.docsforadobe.dev/jsobjref/Gradient
* GradientColor - https://ai-scripting.docsforadobe.dev/jsobjref/GradientColor
* GradientStops - https://ai-scripting.docsforadobe.dev/jsobjref/GradientStops
* GradientStop - https://ai-scripting.docsforadobe.dev/jsobjref/GradientStop
*/

//@target illustrator

(function () {
if (!app.documents.length) {
alert("No active document.");
return;
}

var doc = app.activeDocument;
var sel = doc.selection;

if (!sel.length) {
alert("No active selection.");
return;
}

var processedGradients = [];

for (var i = 0; i < sel.length; i++) {
var item = sel[i];

// Skip anything that does not have a fill.
if (!item.filled) {
continue;
}

var fillColor = item.fillColor;

// Skip anything that is not filled with a gradient.
if (fillColor.typename !== "GradientColor") {
continue;
}

var gradient = fillColor.gradient;

// A gradient swatch can be used by multiple objects.
// Once we edit the swatch, all matching objects update automatically.
if (contains(processedGradients, gradient.name)) {
continue;
}

spaceGradientStopsEvenly(gradient);
processedGradients.push(gradient.name);
}

function spaceGradientStopsEvenly(gradient) {
var stops = gradient.gradientStops;
var totalStops = stops.length;

// Two-stop gradients are already evenly spaced.
if (totalStops <= 2) {
return;
}

var start = stops[0].rampPoint;
var end = stops[totalStops - 1].rampPoint;
var gap = (end - start) / (totalStops - 1);

for (var i = 1; i < totalStops - 1; i++) {
stops[i].rampPoint = start + gap * i;
}
}

function contains(arr, value) {
for (var i = 0; i < arr.length; i++) {
if (arr[i] === value) {
return true;
}
}

return false;
}
})();

 

Anubhav M
Community Manager
Anubhav MCommunity ManagerCorrect answer
Community Manager
June 26, 2026

Hello ​@Rachel38744444mgd4 

 

That is a great idea. Would you mind creating a UserVoice for this feature request (https://illustrator.uservoice.com/) and adding your comments there? Doing this will help us prioritize this request, and you will be notified of any updates.
 
Feel free to reach out if you have more questions or need assistance. We'd be happy to help.
Anubhav