jordond / MaterialKolor

🎨 A Compose multiplatform library for generating dynamic Material3 color schemes from a seed color

Home Page:https://demo.materialkolor.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seed color as primary color

lcb-Qi opened this issue · comments

I want my seed color to be the primary color,how to do it?

Currently there isn't support for this, but with #143 you will be able to do something like:

val seed = Color.Red
val state = rememberDynamicMaterialThemeState(seed, isDark = false) { colorScheme ->
    colorScheme.copy(primary = seed)
}

DynamicMaterialTheme(
    state = state,
    animate = true,
    content = {
        // ...
    }
)