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

Tlaster

08/17/2022, 9:12 AM
Is there any equivalent
androidx.compose.material.MaterialTheme.colors.isLight
in
androidx.compose.material3.MaterialTheme.colorScheme
?
👀 1
o

Oleksandr Balan

08/17/2022, 11:14 AM
I haven’t used M3 yet, but couldn’t you use this method?
Copy code
androidx.compose.foundation.isSystemInDarkTheme
t

Tlaster

08/17/2022, 11:31 AM
But if I wrap a composable with MaterialTheme and provide a dark color, that method does not work as I expect.
o

Oleksandr Balan

08/17/2022, 11:34 AM
Hm, in such case I think you should create your own
Local
🤔
s

ste

08/17/2022, 11:43 AM
You could check the background color (not sure how m3 calls it) luminance
6 Views