Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Gradient stop spacing?

Participant ,
Dec 15, 2017 Dec 15, 2017

Is there. short cut to evenly space the bottom gradient stops going across from left to right?Gradient.jpg

2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Dec 15, 2017 Dec 15, 2017

It is not so fast, but you can create a grid with guides, and then create/copy gradient points not in the Gradient panel but with Gradient Annotator right on the object. (View > Show Gradient Annotator).

gradientannotator.png

Translate
Adobe
Community Expert ,
Dec 15, 2017 Dec 15, 2017

No.

I'm not sure if this can be done by scripting.

But even then you will need to find a script. So maybe if you just need this once, you could just calculate the difference and then enter the percentage in the gradient panel.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2017 Dec 15, 2017

Basically this is actionable to some extent and you could create some „template“ actions that would make your desired gradient stops and distributions, but it would be bound to given colours and therefore it would probably be easier to create a graphic style library that contains the gradient fills with specific stops and distributions.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 15, 2017 Dec 15, 2017

It is not so fast, but you can create a grid with guides, and then create/copy gradient points not in the Gradient panel but with Gradient Annotator right on the object. (View > Show Gradient Annotator).

gradientannotator.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 16, 2017 Dec 16, 2017
LATEST

Andrey, I went with your method making a grid. Thanks for the tip!

Monika, I'll have to pass on writing a script. It's way over my head!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 16, 2017 Dec 16, 2017

Hi iRuss,

as Monika Gause rightly suspects: You can work in gradients with script very well. (Hallo Monika, schön dich zu lesen.)

How often do you need these changes? (Because: You also need a lot of time to create a script.)

And futhermore your example gradient isn't symmetrical and could it never be. The second color is another than the fifteenth (the last but one). Or do you need only spread evenly all gradient stops of your gradient?

For your understanding: In [JS] the position of gradient stops/points/sliders/controllers (what is the right english term for this?) are addressed as gradient.gradientStops.rampPoint

Here is an [JS] example of reading the positions of rampPoint of a gradient (need one opened document with one selected path item with gradient fill color):

// Gradient_gradientStops_checkPosition.jsx

// regards pixxxel schubser

var aDoc = app.activeDocument;

var aSel = aDoc.selection[0];

if ( aSel.fillColor.typename == 'GradientColor' ) {

    var aGrad = aSel.fillColor.gradient;

    var gradStops = aGrad.gradientStops;

    var gradPos = [gradStops.length];

    for (i=0; i<gradStops.length; i++) {

        var rPoint = new Array (2);

        rPoint[0] = "gradientStop"+(i+1);

        rPoint[1] = Math.round(gradStops.rampPoint)+"%";

        rPoint = rPoint.join(" at: ");

        gradPos = rPoint;

        }

    }

alert (gradPos.join("\r"));

You also could change the position and other properties of every gradient stop:

app.activeDocument.selection[0].fillColor.gradient.gradientStops[1].rampPoint = 60;

The position of your second gradient stop is now position at 60%.

But be sure you also have to pay attention all 'mid points' when you change the position of 'his rampPoint'. And you need more maths to spread evenly all gradient stops.

Have fun

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 16, 2017 Dec 16, 2017

Cool!

Hallo Pixxxelschubser und danke für die Info!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines