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

Lucien Guimaraes

02/26/2021, 4:11 PM
I have a weird behaviour right now with TopAppBar only when darkMode is enable. If
elevation = 0.dp
the background is correctly applied. If the elevation is by default, the background color is different (more bright). Is this an intended behaviour or a bug with beta01 ? Also it's only with the black color from Compose (
Color.Black
), I tried with other colors and it's working fine 🤷
1
With
elevation = 0dp
Without specifying the elevation, so it's
AppBarDefaults.TopAppBarElevation
a

Albert Chang

02/26/2021, 4:19 PM
It is the material design specification. https://material.io/design/color/dark-theme.html#properties
The higher a surface's elevation (raising it closer to an implied light source), the lighter that surface becomes. That lightness is expressed through the application of a semi-transparent overlay using the On Surface color.
l

Lucien Guimaraes

02/26/2021, 4:20 PM
Ah that's why
thanks!
l

Lucien Guimaraes

02/26/2021, 4:24 PM
Thanks @Andrey Kulikov 👍
3 Views