About this project

MaterialKolor is a Compose Multiplatform library for building dynamic Material Design 3 color palettes from any seed color. It targets Android, iOS, JVM desktop and JavaScript/wasm, and is published on Maven Central as com.materialkolor:material-kolor. The core idea comes from Google's material-color-utilities, which was Java-only; MaterialKolor ports it to Kotlin Multiplatform and adds Compose-oriented helpers inspired by the m3color project. A separate artifact, com.materialkolor:material-color-utilities, exposes the port without Compose dependencies. Usage centers on dynamicColorScheme() and rememberDynamicColorScheme(), which take a seed color and a dark/light flag and return a ColorScheme. A PaletteStyle parameter (for example Expressive) adjusts the generated palette, and ColorSpec.SpecVersion.SPEC_2025 enables the newer Material 3 Expressive color specification; the default is SPEC_2021. Two convenience composables wrap MaterialTheme: DynamicMaterialTheme, which can animate between schemes, and DynamicMaterialExpressiveTheme, which defaults to the Expressive palette style and SPEC_2025 for more vibrant results. Beyond theme generation, the library ships color utilities: harmonize() to align a color with another (with an optional matchSaturation flag), harmonizeWithPrimary(), lighten() and darken(), and isWarm()/isCold() temperature checks. It can also derive suitable seed colors from an ImageBitmap via themeColors(), themeColor(), rememberThemeColors() and rememberThemeColor(), useful for theming from profile pictures or background images, though the README notes this can be slow and is best done eagerly. Setup is via Gradle, either in a common source set for multiplatform projects or in an app-level build file for Android-only projects, with a version catalog example provided. A hosted builder at materialkolor.com demonstrates the library and can export MaterialKolor or plain Material 3 code; KDoc is published at docs.materialkolor.com. The material-color-utilities module is Apache-2.0 licensed, while the rest of the project is MIT licensed.