Evenly space the gradient colors

Is there a way to distribute evenly or the color space when you create a custom gradient?

The eye is so these little squares of color that are the same distance is really hard, when you create a gradient with lots of colors.

Thank you.

It should work in CS6.

I saved it as a single text file with the .jsx extension.

When I run the script in CS6 (file > Scripts > other Script (but you can install it as well in the Scripts folder))

I get this:

Good response from Moluapple; https://forums.Adobe.com/thread/2153719

Grad var = app.activeDocument.gradients.add ();

var so = app.activeDocument.swatchGroups [1] .getAllSwatches ();

var l = sw.length;

grad.gradientStops [0] .rampPoint = 0;

grad.gradientStops [0] .midPoint = 50;

grad.gradientStops [0] .color = .color sw [0];

for (i = 1; i< l="" -="" 1;="" i++)="">

stop = grad.gradientStops.add ();

Sw [i] .color = Stop.Color;

grad.gradientStops [i] .rampPoint = i / (l - 1) * 100;

grad.gradientStops [i] .midPoint = 50;

}

grad.gradientStops [l - 1] .rampPoint = 100;

grad.gradientStops [l - 1] .midPoint = 50

;

grad.gradientStops [l - 1] .color = sw [l - 1] .color;

Tags: Illustrator

Similar Questions

  • How I evenly space the horizontal menu buttons?

    I am following the tutorial for Kate Café (part 3,http://www.adobekb.com/building_your_first_website_pt03.html#adding) and I'm trying to customize the menu headers. According to, I have to use the default settings. Later, I put the logo on the menu for the 'home' button below the logo, so when you click on the logo, it takes you to the home page.

    I used the Menu > Horizontal option. Here's how mine as:

    Screen Shot 2013-05-16 at 2.27.34 PM.png

    The problem is that my menu buttons are not evenly spaced but tense.

    This is what looks like the demo version:

    fig_37_building.jpg

    Also, I noticed on some online tutorials that others have a Menu > Bar option, it is related to that?

    I checked and my Application Manager said that my version is up-to-date (I use cloud creative).

    Thanks for any help in advance!

    Select a menu item to set its appearance, then press ESC to select the whole menu, go to your control panel space and add horizontal space + in the option of the blue arrow for your menu widget, be sure to have "same size" (sorry, human translation from the french)

  • Shade of color shows ONLY shades of gray on the gradient layer...?

    My color chart seems to be defaulting to only shades of gray on a gradient layer, and I can just find a way to let him replace the color I chose.  After that I created a new layer of gradient fill, when I have the layer selected in the layer list on the right side of the screen, color samples show ONLY gray.  If I click on the sample, it brings up the color selector, but no matter what color I select, the swatch shows shades of gray.  If I select the background layer, it goes back to show my color.

    There's probably a simple explanation to this problem, but I was searching Google for literally hours without finding an answer.  I found some similar questions have the response "go to Image, Mode, and make sure that RGB is selected."  Mine is already set to RGB, so it's not the question.

    How can I change the colors in a gradient fill layer, and why my color chart displays grayscale only when I selected gradient fill layer, even if by clicking on the color chart reveals the color picker?

    To change/edit the gradient colors, double click on the thumbnail of the gradient in the layers panel fill

    Then in the gradient fill box, click just to the right of the gradient word to change the colors

    In the gradient editor, click one of the stages of the color at the bottom of the gradient bar and click color to change the color of this judgment

    There is much more to the gradient to the room Editor to explain on the forum, so you can view the following for more information

    Photoshop elements help | Gradients

    Using Photoshop | Gradients

    The reason for which continues to show your color in levels of gray, is the layer mask is still active with adjustment layers in photoshop elements and layer masks are grayscale

    Photoshop elements help | Layer masks

  • Apply a different color to the gradients

    Probably be very stupid, but I have a question regarding the application of the gradients.

    I did a rectangular box to frame some images in my document and apply a fade to the box so that it looks better with the text on the left side.  However, whenever I have apply the gradient, color automatically goes to black.  When I try to ride this gradient of red instead of black, the whole box is new red (remove the gradient).  I can't work out how to apply a gradient to the color of my choice - as I say, probably be thick!

    Hope you can help.

    Thank you

    Mark

    Mark,

    (1) select the path with the grayscale gradient to be changed;

    (2) in the gradient palette, click on the black square under the cursor (the color of end); in the color palette, you will see a value of 100K;

    (3) or

    (a) click on the up arrow to the right page and select the space to the right color (RGB as the document) and insert the desired value (s of R, G, and B), or

    (b) AltClick/OptionClick a shade of the color of the right end.

  • Unable to access gradient in the form colors.

    Hello.

    Attempts to access the gradient colors by using expression.

    I thought I can have access to them using the table, something like this:

    thisComp.layer("Cubes").content("Group 1").content("Rectangle 1").content("Gradient Stroke 1").colors[0]
    

    But it works only for colors [0], the rest of them (color [1]. color [2]) does not work.

    Maybe there's another option how to access?

    Thank you.

    It is not possible to access value of 'Color' degraded by script or expression (at least this is so in CS5.5 but I don't think it's changed).

    By the expression: If you add a color control with this expression (with the value at the end):

    thisComp.layer("Cubes").content("Group 1").content("Rectangle 1").content("Gradient Stroke 1").colors.value;

    ==> you get an error: "object of type object that requires a number, table or the property.

    By script:

    app.project.activeItem.layer("Cubes").content("Group 1").content("Rectangle 1").content("Gradient Stroke 1").colors.value;

    ==> you get an error: "unable to get or set a value for this property (...)." PropertyValueType of this property is PropertyValueType.NO_VALUE. »

    There are certain types of special properties that have value complex type (PropertyValueType.CUSTOM_VALUE) but can accept expressions and pickwhipped, but for gradients (PropertyValueType.NO_VALUE), it is not still possible...

    (see this blog: http://blogs.adobe.com/aftereffects/2011/05/expression-changes-in-after-effects-cs5-5.html)

    Xavier.

  • Color for the gradient tool selector

    Recently, I started using Adobe Illustrator and watched many tutorials for the basics of it (from Photoshop), but one thing I'm not too comfortable with is the tool gradient in Illustrator than Photoshop.

    I keep reading that the only way to adjust the colors must either use the colors in the color chart or color slider mini but is possible to choose the colors that you can in Photoshop? (Screenshot attached to show what I mean)

    Any help would be greatly appreciated.

    Adobe Gradient.png

    When you have selected a point of gradient in the gradient colors Panel you can double-click the fill color icon in the tool palette to change color with the color picker.

    Not sure if that's what you're looking for.

  • Question of Tablet pressure. Possible to set the pressure gradient color =?

    Hello!

    Not sure if this is possible, but here's what I would do:


    Tablet pressure equal to the gradient colors.


    If I put the primary and secondary colors. The lighter I caress the closest color.
    Example of
    Color A = Blue
    Color B = Red

    Stroke light blue =
    Blow hard = red
    Way races = purple

    That would make really quick rough colouring I think. Can it be done?

    (CS5 + Intuos 4)


    Thank you

    / EDIT: also is possible in Gradients to use more advanced settings? Instead of having just 2 colors and a hotline between them, could I make a curved line? It's not as important as the main issue.

    IE: Beginning at 100: 100, go to 95:90, 90:80, 85:70... etc. 00:00

    Instead of 100: 100, 90:90, 80:80, 70:70

    Hard to explain

    Sorry, neither of the two options are possible.

  • How to set text in an object, so the object expands with the text and has even space on both sides of the object in illustrator cc?

    How to set text in an object, so the object expands with the text and has even space on both sides of the object in illustrator cc?

    R,

    You can do this:

    (1) create the initial direct Type;

    (2) in the appearance palette dialog, click on add a new fill and define the color as you wish;

    (3) effect > convert to shape > Rectangle corners round/Rectangle/Ellipse and set parent > width/extra height as you wish (essentially what needs to be added to the size of the bounding box, if anything).

    After that you can change the Type and the filled area will fit as shown on the picture.

  • Where the gradient editor disappeared to? No color stop!

    I've updated from Photoshop CS to CS3 (since a worm 4 user)... but I noticed that the gradient editor disappeared. Well, I can open it up, but there is nowhere to change the color stops! It is CERTAINLY there and usable in the CS version, but when I open the same file in CS (which is always installed on the pc), the gradient editor now also lost the color stop Editor!

    I tried searching in the pallets, he sought in the Windows menus and view, double click on the gradient in the Toolbox button, clicked on everything from the toolbar gradient, click the arrow at the top right, clicked on the nuances of gradient, but a big fat zip naadaa!

    Someone has experienced something like this before? I wonder if I'd be better to just uninstall and reinstall everything and making sure that I can also uninstall the old version to make sure there are not any conflicts, but I PREFER to keep the available CS, just in case where there are problems in CS3 - like this. Unless, of course, it is the cause of my problem!

    Thanking you in advance!

    BenTimages wrote:

    I guess I should have been more specific: the only remnant, I can see the gradient editor is the part that appears near the bottom of the Options bar, which has all of the options such as Load, Save, New, OK or cancel, or ONE of the color stops - features I been using happily for years. All I can see when I click on the Options bar are the presets and the small black arrow at the top right.

    To be honest, since the purchase of CS3, this is the first time I tried to use the gradient editor, so I can't really tell what was the initial state. Where my mark, the method of uninstalling/reinstalling, just to get back to a decent default value.

    Thus, it is not all second options on the left click on everything, even when I look at the presets when they set in the Options bar.

    There is also no sign of any gradients in the view drop down menus or windows display options, either.

    Click on the gradient of the actual sample that is displayed in the Options bar.

  • Exact transfer even in the 2nd image color correction?

    I photographed an art collection. The first shot of each piece shows art, mat & frame and gray reference grid background. Second shot of each piece is only work (in smaller quantity of mast). I use the median pipette of the levels on the grey grid to standardize the color balance. Every time have a slight overall distribution hot color. The pipette it removes in shots where the grey grid appears, but I'm stuck on how to transfer the same color correction exact to the second image where the grey grid does not appear. Must match the color balance of the two shots of each work. Or another method? Thank you. Three attached screenshots show.PJB_1305-test-01-s.jpgPJB_1305-test-02-s.jpgPJB_1304-test-03-s.jpg

    Well, without all the right answers, I thought to myself. The help of Adobe Photoshop CC document, update 19/06/2016, 400 page tells how to do it properly. Make sure that the adjustments and properties panels are showing. With open images, select the layers in the settings panel. This creates a new adjustment layer and switches automatically to the properties panel. Use the Central pipette, click Grid gray, color cast is removed. Before you flatten, drag the adjustment layer to the image that needs the same exact correction sister. If there are several works of art taken consecutively with even lighting & exposure, the same adjustment layer should work as well on them.

  • Empty spaces in objects when you use the gradient tool

    I followed the instructions on how to make the waves/ribbons with the gradient tool by drawing two lines and then mixing.  I call on the two lines, selected them, mixed them and this is leading to.  I tried also to objects of layer two and get weird spaces like below.  Could this be something in the program, or maybe I have something running that should not be?

    Glitch.JPG

    These paths have only a vascular accident brain, right. No fill? And the meaning of the path is the same?

  • What is the best color space for workflow photo where the goal is marketing and selling prints?

    What is the best color space for workflow photo where the goal is marketing and selling prints?

    The really important thing here is not work in the color space. The important thing is that you set up your calibration targets so they correspond to the document that you are printing on. This means that the white monitor should be a Visual match white paper and black monitor a match to the density of the ink max for the paper.

    But to answer the question - assuming that you print on an inkjet printer, Adobe RGB should cover most of what the printer can reproduce on a glossy paper of good quality. If you have or get a range wide screen you will also be able to see the range of the file to the screen and you can then test your profile to print with confidence that "what you see is what you get".

    Some will say that good inkjet reproduce some colors that are in fact outside the Adobe RGB, and so you have to work in ProPhoto. While technically true, this superior to Adobe RGB color range is very small and very limited and IMO a fairly minor concern.

  • After update to the last version of the space bar no longer give me hand tool / to navigate around my image, everyone knows this? Even for the button on my wacom pen...

    After update to the last version of the space bar no longer give me hand tool / to navigate around my image, everyone knows this? Even for the button on my wacom pen...

    ... computer update restarted... everything seems to work again.

  • gradients in 2015 does not allow me to choose the background to the foreground colors

    In cc2015, I can not choose the colors for the gradient tool by simply selecting colors in the foreground / background color picker.  This used to be a defect.  Does anyone have a solution?

    Have you tried to reset gradients?

  • How can I copy and paste a gradient of color of a document and then use the gradient on another document?

    I make business cards. On the back of the cards, there are two lines with gradients. Here is a map with a gradient of magenta. I want to select the two lines and change the magenta gradient to the orange gradient from the file below. How can I do this? (I don't want to copy the orange lines to a paste, then move them on those magenta). I just want to select the magenta lines and change their color to orange gradient. This will ensure absolute alignment. I want to repeat the process with several other gradients too. Thank you.

    Screen Shot 2015-03-31 at 1.08.31 PM.png

    Screen Shot 2015-03-31 at 1.09.20 PM.png

    David,

    If I (put) understand, you can:

    (1) a way to copy orange gradient of magenta paper path degraded;

    (2) select the two paths of magenta gradients and change the fill to none;

    (3) select the orange gradient path;

    (4) select the two paths of magenta gradients and replace the gradient fill.

    That should give you the desired replacement. For multiple uses of the same gradient, you can consider a shade of gradient.

Maybe you are looking for