https://github.com/zenozeng/color-hash implementation by Kotlin/Android
val color = ColorHash(
"some string", // string which you want to use as hash
listOf(0.35, 0.5, 0.65), // lightness list
listOf(0.35, 0.5, 0.65), // saturation list
minHue: Int = 0,
maxHue: Int = 360
).toColor() // returns Android Color class
// or just use
val color2 = "some hash string".toColor()
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile 'com.github.unhappychoice:color-hash.kt:$version'
}
see LISENCE