Skip to content

hearsilent/BlossomColorPicker

BlossomColorPicker

JitPack license

A beautiful, petal-styled HSV color picker for Android.

Screenshot

demo.mp4

Usage

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
        }
    }
}

Dependency

  1. 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") }
    }
}
  1. Add the dependency to your app/build.gradle.kts:
dependencies {
    implementation("com.github.hearsilent:BlossomColorPicker:latest-version")
}

Minimum SDK

  • Android SDK 26 (Android 8.0)

Inspiration

This project was inspired by the 花瓣顏色選擇器 by @designtips.today .

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributors

Languages