A library to generate color palette for view, imageview and image from URL.
- You can generate color palette of Drawable
- You can generate color palette of View
- You can generate color palette of Image Url.
Step 1. Add the JitPack repository to your Add it in your root build.gradle
at the end of repositories:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.MindorksOpenSource:ViewColorGenerator:v0.1'
}
val viewcolor = ViewColorGenerator()
viewcolor.load(TAG**, object : OnImageLoaded {
override fun onImageLoaded( vibrantColor: String, vibrantLightColor: String, vibrantDarkColor: String, mutedColor: String, mutedLightColor: String, mutedDarkColor: String, dominantColor: String) {
//YOUR LOGIC HERE
}
})
** TAG here is URL/View/Drawable
viewcolor.load(TAG**, object : OnVibrantDarkColorGenerated {
override fun onVibrantDarkColorGenerated(titleTextColor: String, bodyColor: String) {
//YOUR LOGIC HERE
}
})
** TAG here is URL/View/Drawable
viewcolor.load(TAG**, object : OnVibrantColorGenerated {
override fun onVibrantColorGenerated(titleTextColor: String, bodyColor: String) {
//YOUR LOGIC HERE
}
})
** TAG here is URL/View/Drawable
viewcolor.load(TAG**, object : OnMutedDarkColorGenerated {
override fun onMutedDarkColorGenerated(titleTextColor: String, bodyColor: String) {
//YOUR LOGIC HERE
}
})
** TAG here is URL/View/Drawable
viewcolor.load(TAG**, object : OnMutedLightColorGenerated {
override fun onMutedLightColorGenerated(titleTextColor: String, bodyColor: String) {
//YOUR LOGIC HERE
}
})
** TAG here is URL/View/Drawable
viewcolor.load(TAG**, object : OnVibrantLightColorGenerated {
override fun onVibrantLightColorGenerated(titleTextColor: String, bodyColor: String) {
//YOUR LOGIC HERE
}
})
** TAG here is URL/View/Drawable
viewcolor.load(TAG**, object : OnMutedColorGenerated {
override fun onMutedColorGenerated(titleTextColor: String, bodyColor: String) {
//YOUR LOGIC HERE
}
})
** TAG here is URL/View/Drawable
Check out Mindorks awesome open source projects here
Contributor