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

jitinsharma

05/14/2020, 1:29 PM
I’ve created a custom theme by creating a color palette
Copy code
val themeColors = lightColorPalette(
    primary = Color(0xFF092432),
    primaryVariant = Color(0xFF092432),
    secondary = Color(0xFF3DDB85)
)
And initialised the same like this
Copy code
MaterialTheme(colors = themeColors) {
// children
}
Now if I access colors using
MaterialTheme.colors
, I’m able to get custom colors in all composables except for
Dialog
In
Dialog
, the colours reset to default values. Is this a known issue?
l

Louis Pullen-Freilich [G]

05/14/2020, 1:30 PM
Yup, this is a known issue: see http://issuetracker.google.com/issues/154369470
j

jitinsharma

05/14/2020, 1:30 PM
thanks!
z

Zach Klippenstein (he/him) [MOD]

05/14/2020, 2:52 PM
@jitinsharma if you're interested in why this is broken, and how it might be fixed, see this feature request: https://issuetracker.google.com/issues/156527485
👍 1
5 Views