6.0 is a big release. The color engine is now generated from Google's upstream Kotlin source, the
library is split into one module per UI toolkit, and there are new adapters for Compose Unstyled,
Compose Fluent and kmpalette.
Important
6.0 has breaking changes, and some colors change even when your code compiles without changes.
Read the migration guide before upgrading.
New engine
material-color-utilities is no longer a hand-written port. It is generated from upstream's
Kotlin source at a pinned revision, and its output is tested against upstream's Java and Kotlin to
match ARGB for ARGB.
This also brings:
- The 2026 color spec and the new CMF variant, available as
PaletteStyle.Cmf(tertiarySeedColor) SPEC_2025as the default spec. PassSPEC_2021to keep the 5.x colors.- Nullable results where upstream has them, for example
Contrast.lighterreturnsnullinstead
of-1.0
Modules
material-kolor is now several artifacts. Depend on the one for your toolkit:
| Artifact | For |
|---|---|
material-kolor-material3
| Material 3 apps |
material-kolor-core
| Your own theme, with no Material 3 dependency |
material-kolor-unstyled
| New. Compose Unstyled theming |
material-kolor-fluent
| New. Compose Fluent accent shades generated from a seed |
material-kolor-palette
| New. Seed colors from images with kmpalette |
material-color-utilities
| The engine on its own |
Other changes
rememberTonalPalette,TonalPalette.toneColorandTonalPalette.onTonefor building your own
themes from tonal palettesPaletteStyleis now a sealed interface. It is@Serializableand hasparse,fromNameand
KnownStyles.- A
primaryoverride in the theme state now sets only the primary palette. The seed still drives
the rest. - Image helpers sample the image down to 128x128 before quantizing, so large images are much
faster - Fixed release AAB builds failing on AGP 9.4+ with "Entry name contains invalid characters"
(#542) - Removed the
*Ktconsumer keep rules. Consumers don't need to do anything.
Deprecated
These will be removed in 7.0:
- The overloads that take
primaryin - The
ImageBitmaphelpers in core. Usematerial-kolor-paletteinstead.
Builder
materialkolor.com was rewritten from scratch. It previews themes in
Material 3, Compose Unstyled, Compose Frts the code for each.