Skip to content

unhappychoice/color-hash.kt

Repository files navigation

color-hash.kt

CircleCI codecov Libraries.io dependency status for GitHub repo GitHub

https://github.com/zenozeng/color-hash implementation by Kotlin/Android

Usage

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()

Installation

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

dependencies {
    compile 'com.github.unhappychoice:color-hash.kt:$version'
}

LISENCE

see LISENCE