Photoshop's gradient editor needs a few improvements

  • 23
  • Idea
  • Updated 6 months ago
  • (Edited)
It is almost impossible to use the gradient editor to simulate blending between lights, because it draws a straight line through RGB space. It would be good to be able to select HSL and LAB colour spaces for the gradient editor, and it would be even better if you could make bezier curves through RGB space, like the free tool at http://www.foddy.net/2010/10/gentle-g...
It is pretty frustrating that there was more flexibility in Deluxe Paint IV's gradient tool 23 years ago than there is in Photoshop's gradient tool now.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
  • sad

Posted 5 years ago

  • 23
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
It sounds like you haven't used the gradient editor - which does use splines, and can interpolate colors any way you like.
Photo of Bennett Foddy

Bennett Foddy

  • 9 Posts
  • 13 Reply Likes
No, that's false. You can move the handles on te control points but you can't change the orientation of each point or handle in colour space. And you just can't make a smooth gradient that mimics (for example) a sky, a sunset, a spotlight, a flame, or any other emissive form of blending. I had to write myself a custom tool to do these things. It isn't hard to solve: one way is to allow users to make gradients in HSL and LAB colour spaces, and another way is to give users full control over the colour curve in 3-space, as I do in that tool.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
Yes, between several of your posts you've provided some of the context to understand what you meant but didn't quite say.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
Ok look, honestly I don't care about you being rude and weirdly defensive, I just want the feature to be fixed. Now that you understand what I'm saying, can you get someone to investigate solutions?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
I haven't been rude or defensive. I've been trying to understand your requests, why you don't seem to understand the Photoshop gradient UI, and correct several of your misunderstandings about gradients in Photoshop.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
Ok then, now that you've done that, can you get someone to investigate solutions?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
That's why I've kept up the conversation instead of dropping it after your first few posts.
And the "someone" for the investigation and implementation... is me.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
Let me give you a simple example. Suppose I'm trying to blend from orange (255,128,0) to blue (0,0,255) for a skyline or sunset. I need it to look smooth, so I'm trying to use as few control points as possible. In Photoshop by default it blends through desaturated purple to get there, which isn't physical. I want it to bend through light blue to simulate Rayleigh scattering. So I add a dim, pale cyan control point to the middle of the gradient. But now I have this ridiculous hard line in the middle of the gradient, making it look extremely artificial.

Here's photoshop's result:


And here's my tool's result (also: the desired result):
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 747 Reply Likes
That's the same gradient with the middle spread out slightly.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 747 Reply Likes
BTW - the halfway point between 255,128,0 and 0,0,255 should be 128, 64, 128 -- which is desaturated violet, not gray. You are trying to simulate something that is not the mathematical gradient between those 2 end colors.
You'd need complimentary colors (255,255,0 and 0,0,255) to get gray in the middle.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
"That's the same gradient with the middle spread out slightly." the point is there is no good-looking way to spread out the middle point using photoshop!
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 747 Reply Likes
Yes, you can achieve the same gradient in Photoshop pretty easily. I'm not sure why you're struggling so much with the gradient editor.
Photo of David Gurney

David Gurney

  • 1 Post
  • 0 Reply Likes
Probably because the gradient editor sucks.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
In the interests of fairness, here's Photoshop's effort with 100% smoothing applied. Still unacceptable.

Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
Ok, here are three concrete UI suggestions that would help:

1 - allow the user to specify a non-RGB color space when designing gradients within an RGB document (for example, a gradient that traces a spline in LAB or HSL)

2 - allow the user to specify a custom gamma for the gradient when designing the gradient, without having to change the colour scheme for their whole document (which leads to huge problems as we see below where you post an image that looks completely wrong without realizing)

3 - best: allow the user to use bezier splines instead of cardinal splines for their control points. I'm honestly not sure what the best UI solution is for this, but it can't be that hard to solve.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
1) The user can already specify the control points in a non-RGB space. I think you mean to allow a specification of which colorspace the control points will be interpolated in, before being converted to the document colorspace.

2) Again, I think you mean a gamma value for the interpolation before converting to the document colorspace. (and a gamma value for LAB makes no sense)

The example image difference was due to browser color management (wide gamut display matched, sRGB didn't) - not gamma. I should have opened the file instead of sampling values from the screen.

3) I've never seen a good UI for color gradients using bezier controls -- there are too many degrees of freedom involved (it becomes a 3D curve). One might exist, but I haven't seen it yet (and I keep track of all the curves and gradient UIs out there)

This is much closer to what you should have suggested in the first place.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
1) yes, that is what I mean.

2) yes, that's what I mean.

3) I agree that having real bezier controls requires a much more significant overhaul of the editor, but it will also give the user the best ability to create high-quality gradients for the widest variety of purposes.

I also agree that full control of a 3D curve is probably too much for the average user to comprehend, and I can understand why you wouldn't want to have a separate, 'advanced' gradient editor. But I honestly can't imagine that this is an impossible UI problem, and the benefits would be huge.

However, if it *is* impossible to do, you would get 90% of the creative control by implementing both suggestions 1) and 2) and sticking with cardinal splines, and the increase in editor complexity would be quite minimal.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
OK, now you've given us something we can investigate and work on.

As for "advanced" UIs -- they only make sense when the number of users for the advanced UI is large enough to justify the development, testing, and maintenance cost of the advanced UI. So you either need a large number of potential users, or a relatively simple UI design for the advanced controls.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
Let me make one other suggestion that can be implemented without making big changes to the UI. You could have a checkbox option that allowed you to select between splines and simple quadratic beziers. Quadratic beziers don't allow you to control the tangent - only the position of the control point - so there would be no difference in the rest of the UI.

If you did this, there would be two differences in functionality when you had the checkbox checked:

1) The gradient wouldn't necessarily pass through all the control points in RGB space (this would presumably be a downside for some usage cases). In other words - the curve approaches a control point but doesn't touch it.

2) You would get a much smoother gradient with less banding and clumping (a big upside for some usage cases)

Since both options have their pluses and minuses, it would be nice to offer both, and all you'd be adding to the UI is a checkbox marked 'bezier' or 'smooth'.
Photo of Axiom

Axiom

  • 111 Posts
  • 9 Reply Likes
you're not crazy Bennet, your tool's result is much better.
Heck, I'd even like to use it.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Here is the gradient you get using your 2 end colors in Photoshop.
This is the mathematical result of interpolating those colors.


And for a physical simulation of blending light, you would need to use a gamma 1.0 colorspace, which looks like this:

Or with gray in the middle:
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
So Chris, let me get this clear: you're saying I need to change the color space of my photoshop document in order to get attractive gradients? And if I want to tweak how a particular gradient works, I have to change the colour space again?

Even if that was an acceptable workflow, the preview you get in the gradient tool window doesn't use the current colour space, which reduces this to a very slow, annoying process of trial-and-error.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
> And why would you have to make your gradients in a separate document?

Because I don't want to work in 1.0 gamma space most of the time! All my compositions are in standard colour spaces, and I don't want to change them over just so I can make a good-looking gradient.

> How do you figure that the preview is different from the LAB document?

This is really a side topic, but: here's the gradient editor and the output of htat gradient with an image set to LAB. Note: they are not remotely the same:

http://i.imgur.com/k9EUPyI.png

> YOU make an arbitrary curve by setting the control points on the gradient - that's been there since Photoshop 4.0.

It's *not* an arbitrary curve, because you can't set the tangents of the control points.

> You really aren't making sense here.

Thanks for repeatedly telling me I'm not making any sense, by the way. That's really helping things. Are you actually in charge of this functionality or are you just standing in the way of the relevant person finding out about this suggestion?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
It is an arbitrary curve, because you are setting the control points (there are no tangents to set). We're talking about a cardinal spline, not a bezier.

And I'm still trying to figure out what you're talking about.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
I'm trying to tell you that I could do a lot more with a bezier than a cardinal spline! It's not so hard to understand!
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
So all you're claiming here is that you understand bezier splines and don't want to learn a different UI that can produce the same results?
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
No dude, I'm trying to tell you that you CAN'T produce the same results with cardinal splines, which is a basic mathematical fact about bezier vs. cardinal splines. When I asked you produce the same result with the photoshop UI, you totally failed.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
Let's do this: why don't you try to recreate this gradient using photoshop. Then put them side by side, to show how close you got, and tell me what your workflow was.

My workflow was: I defined the beginning and end colour, and placed a single bezier handle to tell the curve how to trace itself through RGB space. It took about 15 seconds.

Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
3 control points: one on each end, one in the middle: 5 seconds if I don't include time spend saving the file and uploading it.

Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
So upload one with an embedded profile! The one you've posted here is nothing but an admission of defeat.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Again, you may be seeing something different depending on your display and browser. When I created it, they were a close match.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
hahaha, yikes. Ok, I get it, you're not serious about improving the product, you'd rather just negate the things I'm telling you and call me an idiot. Can you maybe wave someone over who wants to actually hear from customers?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
You are grossly misrepresenting my statements.
Photo of Rene Schmidt

Rene Schmidt

  • 5 Posts
  • 1 Reply Like
bwahaha the Sr. Scientist snark strikes again.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
OK, instead of matching screen appearance, here's one matching your values, which took about 12 seconds to tweak the midpoints between stops.

Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
Ugh, that does not look remotely the same, and you have an ugly hard band between red and purple and between purple and blue.
Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
Here's my original gradient and your 'identical' version side-by-side. If you think these look the same, this is a lost cause.

Photo of Bennett Foddy

Bennett Foddy

  • 25 Posts
  • 25 Reply Likes
You will never get it sufficiently close for design work, and you will never manage to get rid of those ugly banding problems, because it's a mathematical limitation of cardinal splines.
Photo of dav3punk

dav3punk

  • 42 Posts
  • 5 Reply Likes
Bennett dude. You are on the money here. I have noticed this limitation too with gradients(not to mention it takes 3 UI windows to edit a gradient.) This forum is super frustrating and is pretty much filled with defensive engineers trying to tell us that things work, when they clearly do not have the experience using the tools in practice. They also are not visual. They really aren't interested in listening and understanding what we are asking for.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
Many of our engineers (Dev and QE) are photographers, painters, and/or designers. In practice, we have far more experience, and are very visually oriented.

We are listening or we wouldn't be having the conversation and trying to understand what you are asking for (when the original requests are lacking).
Photo of Troy Gilbert

Troy Gilbert

  • 1 Post
  • 2 Reply Likes
Chris, your tone is still defensive and (worse!) condescending. You've got a dozen people on this thread who all clearly understand the problem that you continue to argue doesn't exist. You do realize you're operating in a customer service capacity, right? You're not helping.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
I have not been defensive - though the response above could be misread as condescending, I'm just relaying facts that someone seems to have missed.

I have been trying to explain misunderstandings, and get to the bottom of the customer request (which was far from clear in the original request). That has been achieved, and yet other people keep posting things that really are not helping the cause of this feature request.

Please read my posts more carefully.
Photo of Ryan Malm

Ryan Malm

  • 2 Posts
  • 6 Reply Likes
I completely agree with Bennett on this, and have had the same issues creating gradients to my liking without adding a 3rd and 4th color stop in both Photoshop and Illustrator. It'd be nice if some more design/art oriented people weighed in on this, as having the defensive developer responsible for acting being the sole person responding is clearly not going anywhere.
Photo of João Francisco Rodrigues Gomes

João Francisco Rodrigues Gomes

  • 2 Posts
  • 0 Reply Likes
Yep. Bennett is in the right, the devs are in the wrong. In no way are the default Photoshop gradient tool results good enough (not after seeing how much better the alternatives can be, at least), and in no way is all that fiddling and tweaking intuitive or acceptable, not for a +thousand-dollar piece of software (be it on the older CS suite, or the new CC subscription). And I've been working in the field (with Adobe CS, no less) for more than 10 years, so that's just my not-so-humble opinion.
Photo of David Jensen

David Jensen

  • 131 Posts
  • 46 Reply Likes
Here's a 3D plot of the two red-to-cyan gradients.
Chris Cox's in white, Bennett Foddy's in Black. The duller shades are 2d projections.

(I realize perceptual color space isn't a cube, and there are probably profile issues, but this at least lets you see the smoothness of the gradients. There is some banding, of course)
Photo of Ryan Malm

Ryan Malm

  • 2 Posts
  • 6 Reply Likes
Plotted this way, you can clearly see the "ugly hard bands" Bennett describes as corners in the plotted gradient path. The only way to get closer to Bennett's result in Photoshop would be to add more color stops, effectively just closer approximating but never quite hitting the smooth curve achieved by Bennett's gradient.

EDIT: Why closed for further discussion? David's posts are showing the existing gradient tools shortcomings in crystal clarity. Throughout this thread you've kept claiming either user ignorance or user miscommunication. Now that time has been taken here to show you EXACTLY what we're talking about, you're going to close the thread? You could at least acknowledge David's graphs with a "Oh, now I get it".
Photo of David Jensen

David Jensen

  • 131 Posts
  • 46 Reply Likes
Edit: "This topic is no longer open for comments or replies."
First time I've seen that here. There's definitely more room for discussion, such as how the interface can work. I'll respond to Ryan Malm's comment here:
A script could be made that makes a close enough approximation of a "gentle gradient" by using the built in gradient feature with a very large number of stops. I may try to make one.

Original message:
Here's another example with the orange to blue gradient, the Photoshop version has a midpoint with 100% smoothness. (sorry about the small-scale jaggedness)
Photo of Edith Wentz

Edith Wentz

  • 1 Post
  • 1 Reply Like
Oooh, I stumbled across this year-old thread by accident.

I'm nowhere near as technical-minded as you guys, but I'm so glad someone is. I never knew why I hated the gradient tool so much.

I almost never use the thing ever, except to try it knowing I'll be disappointed. I always create my gradients by using color-to-transparent gradients on separate layers so I can add colors, eliminate banding, and neutralize undesired tones before merging the result.

But I never could have articulated so helpfully WHY the default sucked - only that it never produced results that were usable.
Photo of João Francisco Rodrigues Gomes

João Francisco Rodrigues Gomes

  • 2 Posts
  • 0 Reply Likes
One word: Affinity, by Serif. I believe you are all barking to the wrong tree, unfortunately... Their software already features superb gradient quality, and they would probably be willing to implement such an outstanding feature, STAT, instead of snubbing their most technically-minded users.

FWIW, I still use CS6 at my day job but have already resorted to Affinity Designer for my background gradient needs (I export them with the desired resolution directly as TIFFs and paste them into Photoshop as needed; not a very elegant workflow, but the end result is *that much better*).

Just my €0,02...
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
I am aware this is an old thread, but today I witnessed the splendour of cubic interpolation between gradient stops in Photoline.

Gradients in Photoshop just do not compare - a far cry from what is possible in terms of quality and ease-of-use when a cubic interpolation option is available.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 747 Reply Likes
Photoshop is already using a cubic interpolation for gradients, and has been since Photoshop 5.0.
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
Great! Then why the quality issues with colour stop interpolation? Could this not be improved?
Please see this thread for a comparison with Photoline:
https://forums.adobe.com/thread/2017683
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
I just checked the same gradient in Illustrator: no issues there, nor when I place the illustrator version in Photoshop.
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
No suggestions, Mr. Cox? Will this issue be considered for improvement in an upcoming update?

Only Photoshop's gradient algorithms seem to be problematic in terms of quality. Other applications generate much better quality. Perhaps it is time to modernize that code a bit?
Photo of Bennett Foddy

Bennett Foddy

  • 9 Posts
  • 13 Reply Likes
Forget it Herbert, it's never going to happen. And to be fair, the current code was written 15 years ago so there's probably nobody at Adobe who remembers how it works.
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
I agree. There have been a number of other legacy issues which are perceived as features by Mr. Cox. At this point I feel they will never be addressed.
Photo of P M

P M

  • 1 Post
  • 1 Reply Like
I have given up on Photoshop. I am using Acorn, which doesn't provide as many customization options, but usually delivers exactly what I want without effort. The two types of gradients it provides, regular and smooth:

Photo of Bennett Foddy

Bennett Foddy

  • 9 Posts
  • 13 Reply Likes
BTW I did a quick test with the latest (2015) versions of illustrator and photoshop to double check. I think the reason Illustrator's one seems less bad is that it's doing simple linear interpolation, which is cruder but more predictable - but you'll see that both of them are pretty bad when it comes to smoothness.



Honestly I could live with it if Photoshop just did the illustrator thing, with a simple linear line in RGB space. My issue is that Photoshop's 'cubic' interpolation just clearly doesn't work as specified. Cubic splines do not have sharp corners in them, sorry!
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 747 Reply Likes
Again, an interpolating cubic spline can have some corners when it hits the control points.
It looks like your "smooth" test isn't hitting the control points and just approximating them instead (which gets a smoother curve, but not the colors you specified).
Photo of Bennett Foddy

Bennett Foddy

  • 9 Posts
  • 13 Reply Likes
Yes, it is technically true that a piecewise cubic spline interpolation with discontinuous derivatives can have corners. Is there some reason why you prefer to use an interpolation with discontinuous derivatives? The only reason I can think of is that you're trying to avoid the curve overshooting the edges of the RGB cube and 'clipping'. But the price is that your gradients are not remotely smooth even when the RGB line goes nowhere near the boundaries.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 747 Reply Likes
We use a very standard interpolating cubic spline. We need to interpolate the color stops, not just approximate them.
Photo of Bennett Foddy

Bennett Foddy

  • 9 Posts
  • 13 Reply Likes
No I get that you need to hit the color stops, that makes complete sense. But It would be easy enough to construct a spline that hits all the stops and has a continuous derivative, right?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 747 Reply Likes
It already has a continuous derivative (assuming you set it to 100% smoothness), it just isn't as smooth as an approximating spline.
Photo of Bennett Foddy

Bennett Foddy

  • 9 Posts
  • 13 Reply Likes
For example, here's an simple interpolation that DOES hit the exact same color stops, but has a continuous derivative

Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
In Photoline both linear and cubic interpolation are available for gradient stops. And both look great.

Krita and Gimp offer 5(!) different gradient interpolation methods - and for each gradient segment the interpolation method is independently controllable: linear, curved, sine, sphere increase, and sphere decrease.

I fail to understand why Photoshop's gradients are of such low quality in this day and age, and the only way to control the interpolation is to keep adding more and more stops. There is no need. Mr. Cox mentioned the code behind the gradient interpolation stems from version 5?

Well, about time for an update then. I submit that this thread has conclusively identified an issue with gradient quality in Photoshop, and it is time for Mr. Cox to admit that this ought to be addressed and improved.
Photo of Bennett Foddy

Bennett Foddy

  • 9 Posts
  • 13 Reply Likes
Here's the full notebook in case anyone wants to reproduce or tweak
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
What did you use to visualize the math?
Photo of Bennett Foddy

Bennett Foddy

  • 9 Posts
  • 13 Reply Likes
Mathematica