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

Brian Donovan

12/29/2021, 9:33 PM
Hey all, I am trying to do this dark transparent look. I was using alpha but it was hiding the background image and turning the text color from white to a lighter grey. Any help please
k

Kirill Grouchnikov

12/29/2021, 9:53 PM
Looks like something like Modifier.background(Color.Black.withAlpha(0.25f)) on the parent, and then the regular content stays unchanged (texts, icons, etc)
👍 1
b

Brian Donovan

12/30/2021, 12:11 AM
ty
Am I still missing something?
k

Kirill Grouchnikov

12/30/2021, 2:44 AM
Oh right, I was thinking about my own extension. Use either
Color.Black.copy(alpha = 0.25f)
or just
Color(0x40000000)
and tweak the alpha
b

Brian Donovan

12/30/2021, 3:58 AM
thanks Krill