Color Picker

Additional

Language
Java
Version
v2.0 (Oct 23, 2017)
Created
Sep 24, 2017
Updated
Oct 23, 2017
Owner
Shishank Singh (shishanksingh2015)
Contributors
Shishank Singh (shishanksingh2015)
shubhamdhabhai
2
Activity
Badge
Generate
Download
Source code
APK file

Show card

colorpicker

A custom color picker that will pick colors from any image.

Gradle

compile 'com.github.shishanksingh2015:colorpicker:v1.0'

Maven

<dependency>
     <groupId>com.github.shishanksingh2015</groupId>
     <artifactId>colorpicker</artifactId>
     <version>v1.0</version>
 </dependency>

Implementation

Android Color picker, is a custom image or drawable color picker.It is very easy to use and customize.It track the color change continuously on moving picker and also on track color change on tap of color picker.

Usage

  • In XML layout:
    <com.colorpicker.shishank.colorpicker.ColorPicker
        android:id="@+id/colorPicker"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>
        
  • Value Change Listener
   colorPicker.setGradientView(R.drawable.color_picker);
        colorPicker.setColorSelectedListener(new ColorPicker.ColorSelectedListener() {
            @Override
            public void onColorSelected(@ColorInt int color, boolean isTapUp) {
                imageView.setBackgroundColor(color);
                if (isTapUp) {
                    Toast.makeText(MainActivity.this, "On Tap Up called", Toast.LENGTH_SHORT).show();
                }
            }
        });

Please feel free to contribute by pull request, issues or feature requests.