https://kotlinlang.org logo
#compose
Title
# compose
m

Mikołaj Kąkol

11/13/2023, 2:28 PM
I’m having an issue with banding as on the image below. Any ideas? This screenshot from JVM app, but the same issue I have on device Android API 30 and emulator API 33. I don’t see in compose any dithering or RGBA_8888 or #FE transparency hacks that could work. So again, ideas? 😄
@romainguy, sorry for direct. I see that you posted earlier that dither should be on for gradients by default. So I wonder if this is acceptable behavior?
r

romainguy

11/15/2023, 3:40 PM
I can't see banding in your screenshot. I see a Mach band but there's nothing you can do about that, it's a perception issue in our brains
m

Mikołaj Kąkol

11/15/2023, 3:55 PM
Alright I thought that some graining effect would fix our brains and there is something in the framework we could leverage
r

romainguy

11/15/2023, 4:07 PM
You're talking about the white band at the bottom right?
m

Mikołaj Kąkol

11/15/2023, 4:08 PM
I'm talking about feeling that center is most bright
While it's the same calor from center to the bottom
r

romainguy

11/15/2023, 4:10 PM
Yeah that's the Mach band
Nothing you can do about that, certainty not with dithering
I mean the fix is to change the colors you use or to change the "slope" of the gradient
m

Mikołaj Kąkol

11/15/2023, 4:12 PM
Thank you for your help 🙏
r

romainguy

11/15/2023, 4:14 PM
Anytime!
I gave a talk to my team a while back on this kind of issues, i should make it public or turn it into an article
m

Mikołaj Kąkol

11/15/2023, 4:15 PM
It's probably something that designers should be aware too
r

romainguy

11/15/2023, 4:17 PM
Indeed!
2 Views