A beautiful, petal-styled HSV color picker for Android.
demo.mp4
Add the BlossomColorPickerView to your layout:
<com.hearsilent.blossomcolorpicker.libs.views.BlossomColorPickerView
android:id="@+id/blossomColorPicker"
android:layout_width="match_parent"
android:layout_height="wrap_content" />In your Activity or Fragment:
binding.blossomColorPicker.apply {
setColor(initialColor)
listener = object : BlossomColorPickerView.OnColorChangedListener {
override fun onColorChanged(color: Int) {
// Handle color change
}
}
}- Add the JitPack repository to your
settings.gradle.kts:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}- Add the dependency to your
app/build.gradle.kts:
dependencies {
implementation("com.github.hearsilent:BlossomColorPicker:latest-version")
}- Android SDK 26 (Android 8.0)
This project was inspired by the 花瓣顏色選擇器 by @designtips.today .
This project is licensed under the MIT License - see the LICENSE file for details.