
Lightweight wrapper around Google's Material Color Utilities enabling generation of accessible, user-driven color schemes (including Material 3) using HCT, advanced algorithms, tone and chroma control.
Material Color Utilities for Kotlin is a cross-platform wrapper written entirely in Kotlin around Google's Material Color Utilities (MCU), making it easy to generate beautiful, accessible, and user-driven color schemes (including Material 3) using advanced color algorithms.
build.gradle.kts file:dependencies {
implementation("space.zghoba:material-color-utilities-kotlin:2.1.0")
}import hct.Hct
fun main() {
// Same perceived brightness.
// Different hue.
val red = Hct.from(hue = 20.0, 80.0, 60.0).toInt()
val green = Hct.from(hue = 140.0, 80.0, 60.0).toInt()
val blue = Hct.from(hue = 260.0, 80.0, 60.0).toInt()
}[!NOTE] The HCT color model isn't the only feature offered by the Material Color Utilities repository. See Capabilities Overview for more information.
This project is licensed under the MIT License — see the LICENSE file.
Material Color Utilities for Kotlin is a cross-platform wrapper written entirely in Kotlin around Google's Material Color Utilities (MCU), making it easy to generate beautiful, accessible, and user-driven color schemes (including Material 3) using advanced color algorithms.
build.gradle.kts file:dependencies {
implementation("space.zghoba:material-color-utilities-kotlin:2.1.0")
}import hct.Hct
fun main() {
// Same perceived brightness.
// Different hue.
val red = Hct.from(hue = 20.0, 80.0, 60.0).toInt()
val green = Hct.from(hue = 140.0, 80.0, 60.0).toInt()
val blue = Hct.from(hue = 260.0, 80.0, 60.0).toInt()
}[!NOTE] The HCT color model isn't the only feature offered by the Material Color Utilities repository. See Capabilities Overview for more information.
This project is licensed under the MIT License — see the LICENSE file.