MaterialKolor 3.0.0
🎉 Material 3 Expressive Support
MaterialKolor 3.0.0 introduces support for Material 3 Expressive, allowing you to create more vibrant and expressive themes with enhanced motion capabilities.
Quick Start with Material Expressive
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
@Composable
fun MyExpressiveTheme(
seedColor: Color,
isDark: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit
) {
DynamicMaterialExpressiveTheme(
seedColor = seedColor,
motionScheme = MotionScheme.expressive(),
isDark = isDark,
animate = true,
content = content,
)
}
For direct usage with MaterialExpressiveTheme
:
val scheme = rememberDynamicColorScheme(
seedColor = seedColor,
isDark = isDark,
specVersion = ColorSpec.SpecVersion.SPEC_2025,
style = PaletteStyle.Expressive,
)
MaterialExpressiveTheme(
colorScheme = scheme,
motionScheme = MotionScheme.expressive(),
)
🚨 BREAKING CHANGES 🚨
1. Extended Fidelity Removed
- BREAKING:
isExtendedFidelity
parameter has been removed from all APIs as it's no longer part of the Material Color Utilities upstream library - Remove any usage of
isExtendedFidelity
from your code
2. Parameter Naming Consistency
- BREAKING: All theme composables now use
isDark
parameter instead ofuseDarkTheme
- Update
DynamicMaterialTheme()
calls to useisDark
parameter
3. ColorSpec Version Support
- NEW: Support for ColorSpec 2025 alongside the existing 2021 spec
- Default remains ColorSpec 2021 for backward compatibility
- Use
specVersion
parameter to opt into the 2025 specification
✨ New Features
Material 3 Expressive
- Added
DynamicMaterialExpressiveTheme
composable for easy Material Expressive theme creation - Support for expressive motion schemes with
MotionScheme.expressive()
- New
PaletteStyle.Expressive
for more vibrant color palettes
Fixed Colors Support
- Added support for "Fixed" colors in Material 3
- Fixed colors maintain consistent appearance across light and dark themes
- Properly handles fixed colors in dark mode
ColorSpec 2025
- Support for the latest Material Design color specification (2025)
- Backward compatibility with 2021 spec via
specVersion
parameter - Platform-specific color generation improvements
Enhanced Animation Support
- New
animateColorScheme
extension function for smooth color transitions forColorScheme
- Transition-based animations for color scheme changes
🔧 Improvements
- Fixed color scheme generation for both 2021 and 2025 specifications
- Added comprehensive tests to ensure color generation matches upstream library
- Improved dark mode handling for fixed colors
- Better parameter consistency across all APIs
- Enhanced documentation and examples
📦 Dependencies
- Kotlin 2.2.0
- Compose Multiplatform 1.9.0-alpha03
- Android Gradle Plugin 8.10.1
- Gradle 8.14.3
⚠️ Important Notes
- This release requires Compose Multiplatform 1.9.0-alpha03
- Check the Compose Multiplatform Known Issues before upgrading
- The
isAmoled
parameter is now optional with a default value
🐛 Bug Fixes
- Fixed duplicate declaration of
animateColorScheme
- Fixed color generation issues with 2021 and 2025 specifications
- Fixed dark mode issues with fixed colors
- Resolved missing
specVersion
parameter inrememberDynamicScheme
📋 Migration Guide
From 2.x to 3.0.0
-
Remove
isExtendedFidelity
:// Before dynamicColorScheme( seedColor = color, isDark = true, isExtendedFidelity = true ) // After dynamicColorScheme( seedColor = color, isDark = true )
-
Update parameter names:
// Before DynamicMaterialTheme( seedColor = color, useDarkTheme = true ) // After DynamicMaterialTheme( seedColor = color, isDark = true )
-
Use Material Expressive (optional):
// New Material Expressive theme DynamicMaterialExpressiveTheme( seedColor = color, motionScheme = MotionScheme.expressive(), isDark = isDark )
Full Changelog: 2.1.1...3.0.0