<p>The non smooth appearance, or visual stripes you see, is called <strong>color banding</strong>. (<a href="https://en.wikipedia.org/wiki/Colour_banding" rel="nofollow noreferrer">Wikipedia</a>) It is produced since the medium, in this case your screen, is only capable of producing a finite array of colors and as the mathematical equation progressively passes through the color change you monitor "jumps" a visual amount of "steps". Higher resolution monitors will suffer from banding less but still still have noticeable steps in high contrast gradients, such as from black to white.</p>

<p>The "jumps" back to a darker color is, as <strong>lightxbulb</strong> mentioned, an optical illusion called Mach bands. (<a href="https://en.wikipedia.org/wiki/Mach_bands" rel="nofollow noreferrer">Wikipedia</a>)</p>

<p>Printing a gradient will often have the same issue, no matter how high the resolution is. I have often had clients provide artwork for high quality printing and have been very disappointed with banding effect.</p>

<p>Banding is not only present in gradients but most noticeable in high contract change gradients and low resolution mediums.</p>

<p>There are techniques to help with banding like dithering or adding noise. But these techniques will often require moving to pixel based artwork and not mathematical perfect vector.  Here is a great article to understand banding and how to avoid it using Photoshop. <a href="https://www.slrlounge.com/remove-banding-photoshop/" rel="nofollow noreferrer">https://www.slrlounge.com/remove-banding-photoshop/</a></p>

CC BY-SA 4.0
2019-02-07T16:42:15.693Z
2019-02-07T16:42:15.693Z
i am xoph
<p>The image's histogram isn't entirely flat which could imply that some grey levels are represented more than others, I'm not sure this would cause the effects you see - I expect not. Try printing the image as a hight quality photo on glossy paper, this should eliminate the shortcomings of your screen.</p>

CC BY-SA 4.0
2019-02-07T09:02:40.953Z
2019-02-07T09:02:40.953Z
beyond
<p>The 'jumps' to 'a bit darker' are an optical illusion due to how human perception works. Check out Mach bands in wikipedia. Now as for why you get a step function even though you have a smooth transition in code: this is due to quantization. Your monitor can reproduce a finite amount of grey levels, so you quantize your otherwise continuous range.</p>

CC BY-SA 4.0
2019-02-07T10:25:08.887Z
Thank you for pointing the wikipedia article about the Mach bands. It is very interesting
David
CC BY-SA 4.0
2019-02-11T09:19:13.977Z
@lightxbulb *"Your monitor can reproduce a finite amount of grey levels"*. One could also argue that if you're only storing the image with 8bits/channel, it's not just the monitor's fault!  

*David* : One suggestion would be to compute your gradient with 9 or 10 bits/channel and use, say, ordered dither when reducing to 8bpc precision.
Simon F
CC BY-SA 4.0
2019-02-11T10:06:46.527Z
@SimonF You're sending off 8bit buffers for displaying precisely because of the limited capabilities of your monitor. Most (budget) monitors are not even 8bit but 6bit+FRC. You may as well be using doubles on your app side, you still need to display the colours on your monitor, so you will convert to 8bit at some point if your monitor doesn't support higher. Obviously dither can help a little.
lightxbulb
CC BY-SA 4.0
2019-02-12T08:40:32.450Z
@lightxbulb Ha! You youngsters with your digital input monitors. I feel you have put the cart before the horse. Shall I send you a picture of a graphics card with its separate DAC chip set to drive an *analogue* input CRT monitor? ;-)  It's more a historical, memory cost reason for the choice of precision and that 8-bits (with gamma) is *almost* enough for certain use cases: https://poynton.ca/notes/colour_and_gamma/GammaFAQ.html#smoothly_shade
Simon F
CC BY-SA 4.0
2019-02-12T11:18:55.447Z
@SimonF I don't think I understood your point.
lightxbulb
CC BY-SA 4.0
2019-02-12T15:18:16.947Z
What I mean is, display devices from, say, the 70s through to late 90s, had analogue input, so the precision (arguments about noise etc, limiting precision excepted) of these devices could be said to be > 8bpc. It was the graphics subsystem memory + DAC which then determined the effective image depth. Since memory was typically rather expensive, 8bpc was usually the limit. (Some systems did use higher precision, e.g. some Silicon Graphics work stations, but then they were probably also rendering in linear space and so would need greater precision in order to obtain the required dynamic range.)
Simon F
CC BY-SA 4.0
2019-02-07T02:44:40.150Z
2019-02-07T13:17:32.860Z
2019-02-07T13:17:32.860Z
lightxbulb
<p>On the picture below you can see mathematically perfect smooth transition from black to white. But I noticed that on all gradient picture I see strange strips and the color transition doesn't feel smooth. I even see that if you pass from black to white, there are some small jumps back to a bit darker color, when theoretically the color should become always whiter and whiter.</p>

<p>Can somebody explaing me this phenomena?
<a href="https://i.sstatic.net/Jcf3t.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Jcf3t.png" alt="Gradient from black to white"></a></p>

CC BY-SA 4.0
2019-02-06T21:56:44.440Z
Read [this](http://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/) blog post.
Hubble
<color-science>
Strange stripes on the gradient
David
# Strange stripes on the gradient

(Asked by: username_0 on 2019-02-06)

On the picture below you can see mathematically perfect smooth transition from black to white. But I noticed that on all gradient picture I see strange strips and the color transition doesn't feel smooth. I even see that if you pass from black to white, there are some small jumps back to a bit darker color, when theoretically the color should become always whiter and whiter.

Can somebody explaing me this phenomena?
[![Gradient from black to white](https://i.sstatic.net/Jcf3t.png)](https://i.sstatic.net/Jcf3t.png)

**Tags:** color-science

> **Comments:**
> **username_1**: Read [this](http://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/) blog post.  

---

## 3 answers

### Answer by username_4 on 2019-02-07. Score: 4 | Accepted answer

The 'jumps' to 'a bit darker' are an optical illusion due to how human perception works. Check out Mach bands in wikipedia. Now as for why you get a step function even though you have a smooth transition in code: this is due to quantization. Your monitor can reproduce a finite amount of grey levels, so you quantize your otherwise continuous range.

> **Comments:**
> **username_0**: Thank you for pointing the wikipedia article about the Mach bands. It is very interesting  
> **username_5**: @username_4 *"Your monitor can reproduce a finite amount of grey levels"*. One could also argue that if you're only storing the image with 8bits/channel, it's not just the monitor's fault!    *username_0* : One suggestion would be to compute your gradient with 9 or 10 bits/channel and use, say, ordered dither when reducing to 8bpc precision.  
> **username_4**: @username_5 You're sending off 8bit buffers for displaying precisely because of the limited capabilities of your monitor. Most (budget) monitors are not even 8bit but 6bit+FRC. You may as well be using doubles on your app side, you still need to display the colours on your monitor, so you will convert to 8bit at some point if your monitor doesn't support higher. Obviously dither can help a little.  
> **username_5**: @username_4 Ha! You youngsters with your digital input monitors. I feel you have put the cart before the horse. Shall I send you a picture of a graphics card with its separate DAC chip set to drive an *analogue* input CRT monitor? ;-)  It's more a historical, memory cost reason for the choice of precision and that 8-bits (with gamma) is *almost* enough for certain use cases: https://poynton.ca/notes/colour_and_gamma/GammaFAQ.html#smoothly_shade  
> **username_4**: @username_5 I don't think I understood your point.  
> **username_5**: What I mean is, display devices from, say, the 70s through to late 90s, had analogue input, so the precision (arguments about noise etc, limiting precision excepted) of these devices could be said to be > 8bpc. It was the graphics subsystem memory + DAC which then determined the effective image depth. Since memory was typically rather expensive, 8bpc was usually the limit. (Some systems did use higher precision, e.g. some Silicon Graphics work stations, but then they were probably also rendering in linear space and so would need greater precision in order to obtain the required dynamic range.)  

---

### Answer by username_2 on 2019-02-07. Score: 4

The non smooth appearance, or visual stripes you see, is called **color banding**. ([Wikipedia](https://en.wikipedia.org/wiki/Colour_banding)) It is produced since the medium, in this case your screen, is only capable of producing a finite array of colors and as the mathematical equation progressively passes through the color change you monitor "jumps" a visual amount of "steps". Higher resolution monitors will suffer from banding less but still still have noticeable steps in high contrast gradients, such as from black to white.

The "jumps" back to a darker color is, as **username_4** mentioned, an optical illusion called Mach bands. ([Wikipedia](https://en.wikipedia.org/wiki/Mach_bands))

Printing a gradient will often have the same issue, no matter how high the resolution is. I have often had clients provide artwork for high quality printing and have been very disappointed with banding effect.

Banding is not only present in gradients but most noticeable in high contract change gradients and low resolution mediums.

There are techniques to help with banding like dithering or adding noise. But these techniques will often require moving to pixel based artwork and not mathematical perfect vector. Here is a great article to understand banding and how to avoid it using Photoshop. <https://www.slrlounge.com/remove-banding-photoshop/>


---

### Answer by username_3 on 2019-02-07. Score: 0

The image's histogram isn't entirely flat which could imply that some grey levels are represented more than others, I'm not sure this would cause the effects you see - I expect not. Try printing the image as a hight quality photo on glossy paper, this should eliminate the shortcomings of your screen.


---

