Automatically make gradients by just selecting two or more colors
Create a default gradient of two or more colors just by selecting them on the artwork or on the swatches panel without having to copy and paste the color codes separately.
The latest Beta build 29.0.0.9 now allows us to create a gradient from selected swatches, using two ways:
- Select swatches you need (use Cmd/Ctrl to select several) and drag-n-drop them onto the gradient strip in Gradient panel.
- Select swatches you need and choose the new 'Gradient from Swatches Selection' command from the Swatches panel’s flyout menu.
In both cases new gradient stops will be spread uniformly, using the current order of swatches in the panel (not the order of selection).
If you have artwork selected in the document while doing this, the gradient will be automatically applied to it.
Please try the feature and comment back.
-
Ashfaque Khatti commented
Sometimes i feel handicapped while working with gradients.
It feels like that Illustrator is holding my leg when working with gradients.I want Illustrator to help make a gradients from the colors of selected shapes or objects. Since the option is not available so, I have to select colors from swatches individually and put them on gradient bar to make a gradients.
-
Kim Yoonmi 김윤미 金潤美 Surname first commented
I think being able to recover the gradient and specific colors later would be important.
@SauravBut here are some ways to fix it without the "extra steps":
1. There is an idea with the swatch to do something like Photoshop where it remembers X amount of colors from dropper tool. If you implement that *at the same time* as this idea, then implementation of both won't be as difficult.
Personally, I would think given the infrastructure of AI and the fact it is vector, this idea would be much more easy to implement than it was in Photoshop.
2. For users, doing both isn't a bad idea?
Redundancy in UX is often the gold standard and why cut off one option when you could easily have both, especially if you do the previous idea of previous colors used. If you up the usefulness of the swatches pane in several ways, then it's not "extra steps".Other swatches pane ideas like better organization of patterns and gradients, the automatic swatches idea would mean more traffic to that section.
So if you coordinate the ideas, I think implementation might be easier in the long run.
*Some programmer talk*
If the program has picked up on the previous colors and then uses that already in its system as a reference, wouldn't that be the same as picking from the pane, though to the user it looks exactly the same? To the program it's already created the reference to the user, so it makes no difference because it "remembers" it, thus creating from the swatches panel or creating on the fly would be the same since it has already "remembered" the swatch involved. The only additional issue would be creating the infrastructure of "On the fly" and "from the pane" but in theory it can be fairly similar and would both end in referring to the gradient panel anyway."Are you sure you want to create gradient?" Yes
check if you don't want to see this again.Gradient panel w/colors.--> Done.
Or that's my suggestion. i.e. implement both suggestions, coordinate them, and in the long run it would cut programmer time on both ends.
Do you need the Figma? The front end implementation would simply be two different locations that lead to the same path, simplify the UX, though it's only like what? 2 points of entry.
Of course this means you have to implement the other suggestion first, (i.e. remember last colors eyedropped), but building the architecture on the back of that and doing both sides of this wouldn't be difficult, I would think, since it's leading to the same UX path only from different entries. Of course, if you do this suggestion first, then do the other one, then the programming is going to be a lot more difficult... but I think reasonably one shouldn't do that.
-
Amybest222 commented
swatches panel for me
-
Joreld Dhamo commented
Hey Egor,
of course I haven't thought of all the scenarios but I'll try to answer as I think could be more easy to use.
So first, I think adding the color to swatches makes it a bit more complicated and we lose the purpose of the feature, so I'd generate a square with that gradient applied (adding it to swatches can be also done in the background). So I'd keep the 2+ elements used to generate the gradient in the current state, and just add a square with the generated gradient.
If the sources elements have strokes, I'd just get the fill property from both but only if it's a solid color, so I'd ignore the stroke.
If the source elements have gradient fills the option is grayed out (only with 2 or more solid colors works)
Same if it's a freeform gradient.The order can be defined by the position in the workspace (X, Y) so the top/left go first and bottom/right ones go last.
It would make no sense selecting them on swatches in my opinion as that is currently possible by generating first the gradient and picking the colors from the swatches panel. What we are aiming to do is to simplify the process of creating gradients without leaving the artboard. 😄
I hope that helps. Of course the above are my opinions and everyone can suggest better solutions.
Thank you!
Joreld -
Joreld, what should happen then?
Should this new gradient be immediately applied to the objects you have selected in the artwork? — since you say specifically 'choose two or more colors in the artwork'.
Or should this gradient just get added to Swatches, but not to change the current color of the selected objects? With or without a dialog to set a name for it?Do you want this function to sample fills only, or strokes as well?
What should it do if selected objects have both a fill and a stroke specified?What if selected objects have gradient fills themselves?
What it’s a freeform gradient?What order of colors should this feature use? By z-order of selected objects or their arrangement on canvas?
What if you don’t select these on canvas, but select actual swatches in Swatches — should it work as well?
Please try to answer these.
-
Joreld Dhamo commented
Hey Saurav,
thank you for following this up.
Currently the gradients can be created only by pressing the gradient panel first and picking colors one by one. It would be great to have the possibility to choose two or more colors in the artwork and generating a gradient out of them.
The way it works at the moment makes it quite difficult to make 3+ colors gradinets. Something similar can be also done with the blend tool, so having the option to create gradients using the right click options.
Let me know if that is clear enough!
Thanks again
Joreld -
Kim Yoonmi 김윤미 金潤美 Surname first commented
I can't get the script suggested to work regardless on my machine, and I do think it should be native to Illustrator in the first place and also easily accessible in the ways I listed. (the 2 ways listed). I can mock up the wireframes too.
I know how to do the UX for it. I think the scripting UX , as shown is awkward in the first place.
Being able to right click and being able to access it from a menu would help.
The stack exchange scripting idea doesn't work either since it's asking to "repeat the same colors" and "Why don't you use a script?" But a script doesn't always work and for some people they can't use one... so... I think making it native would make it easier.
Right click--> "Make gradient from Swatches" --> Goes to gradient panel. The math is done for you.
Hamburger swatches Menu--> "Make gradient from swatches"-->Goes to gradient panel.
You can then drag and drop gradient to the swatches panel.
Say I've picked up 13 key colors. That's really hard to math out of 100, no?
But these 13 key colors are throughout the whole document and you want to make a gradient, sitting there and mathing 13/100 would be hard.
7.69230769231 >.< Who wants to sit there for an hour to math that with the sliders? Make it easier on the graphic designers. Key colors used throughout the piece, unify into a gradient. The sliders are also finnicky sometimes and moves a degree off. TT Anything over 3-4 and it's harder to place colors.
Just make it native.
-
Sorry for offering scripts. Read about the problem you are having in another post. What seems to be the problem?
-
Most things plugins do (especially paid ones) are desired to have form the box.
But to be fair — some plugins go more specialized than Ai can allow them to have for the majority of users.
If the plugin you have in mind is Gradient Forge by Astute Graphics — totally worth it.Also, there are free scripts that can help to achieve similar results, like this one:
https://graphicdesign.stackexchange.com/questions/75097/how-to-repeat-a-gradient-multiple-times-in-illustrator-and-photoshopAnyway, the request is pretty valid, and I upvote it.
-
Kim Yoonmi 김윤미 金潤美 Surname first commented
Automatically create gradient from swatches (Yes I know there is a plug-in. It won't work on my machine and I think this should be native and then it might be able to expand the capabilities of the swatches panel from there?)
So say you have 10 colors, I don't want to have to sit there dividing 10 colors already in the swatches panel. If I select the folder or a range of them, I should be able to right click and then select "create gradient" menu comes up.
Or be able to select it from the Swatches hamburger menu (both would be great)
Then it evenly spaces the colors from the swatches.
2 colors? 2 sliders at 100 and 0
3 colors? 3 sliders at 100, 50 and 0.
... etc.No need to do the math and get it imperfect. 20 colors? No sweat. Currently Sit there and cry...
A rainbow swatch creation: Easy under the new proposal
Under the current system: Sit there and calculate the number, and math it wrong and then cry.I frequently have to make gradients, so this would be great to have. It would also encourage me to use the swatches palette.
Also, it would make it easier to pull colors from a gradient this way. I know what the base color is already because I used a color/folder to create the gradient in the first place. (I often have to tweak gradients and this is a pain.)
-
Laura, this looks exactly like an operation Gradient Forge plugin can do. It has Swathes to Gradients and Artwork Fills to Gradient commands.
The plugin is paid though, but worth trying.There are several scripts solution that do the same thing:
1. https://graphicdesign.stackexchange.com/questions/75097/how-to-repeat-a-gradient-multiple-times-in-illustrator-and-photoshop (even 2)
2. https://github.com/mhulse/illy-grad -
Laura Eleanor McAleer commented
Have a feature so that you can select a number of solid coloured shapes and drag and drop them to form an instant multicoloured gradient based on the select colours. The spacing defaults equally between the gradient sliders. Option to save new gradient into swatches or directly apply to the next selected object.
-
Another method for this would be the Gradient Forge plugin panel.
-
Joreld Dhamo commented
Absolutely Egor, and actually there is space for it to be a bit more user friendly. :)
-
Joreld, you are welcome. It does not mean Ai should not have it by default :)
-
Joreld Dhamo commented
Thanks a lot, Egor, the Illy grad does exactly what I had in mind. Will definitely use that!
-
There are some external script solutions that can help you to do what you want:
1. https://github.com/mhulse/illy-grad — will create a gradient from multiple selected swathes in the panel
2.https://graphicdesign.stackexchange.com/questions/75097/how-to-repeat-a-gradient-multiple-times-in-illustrator-and-photoshop — there are two different solutions in comments with slightly different functionality that use colors of on-canvas objects
-
There are several script solutions to create a gradient from the selected colors:
1. https://github.com/mhulse/illy-grad — creates a gradient form selected swatches
2. https://graphicdesign.stackexchange.com/questions/75097/how-to-repeat-a-gradient-multiple-times-in-illustrator-and-photoshop — two similar scripts with slightly different options to create a gradient from selected colors on canvasAnd sure both methods should be available by default, I agree with you here. Voted.
(Edited by admin) -
Ashfaque Khatti commented
nice. or it could let us make gradients from colors of selected shapes on the art board.
I have just posted same request for gradients. -
Chris Panny commented
It would be nice to select two or more swatches in the Swatches panel and then go to the Gradient panel and click an option to Apply Selected Swatches To Gradient Slider.