If you use Groovy DSL (app build.gradle)
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
If you use Kotlin DSL (settings.gradle):
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
...
maven("https://jitpack.io")
}
}
On your app gradle add:
//If you use Groovy DSL
implementation 'com.github.Whiskers-Color-Scheme:whiskers-palette-kt:1.1.0'
//If you use Kotlin DSL
implementation ("com.github.Whiskers-Color-Scheme:whiskers-palette-kt:1.1.0")
To get the palettes:
val palettes = getWhiskersPalette() //Provides both palettes
val palette = getPantherPalette()
val palette = getTigerPalette()
To get a color:
val color = getWhiskersPalette().panther.banana
val color = getPantherPalette().banana
val color = getTigerPalette().banana
To get a value from the color
val color = getPantherPalette().banana
val hex = color.hex
val rgb = color.rgb.rgb
val r = color.rgb.r
val g = color.rgb.g
val b = color.rgb.b
val hsl = color.hsl
val h = color.h
val s = color.s
val l = color.l
This repo also provides an android app for getting the palette. It can be download in the releases page