Skip to content

j4velin/colorpicker

 
 

Repository files navigation

colorpicker

Fork of ColorPickerPreference

Improvements:

  • extract colors from photo
  • copy/paste
  • no dialog title

Usage

Add to your build.gradle:

dependencies {
    compile 'com.github.j4velin.colorpicker:colorpicker:+'
}

To show the dialog:

ColorPickerDialog dialog = new ColorPickerDialog(getActivity(), Color.BLACK);
                dialog.setOnColorChangedListener(new ColorPickerDialog.OnColorChangedListener() {
                    @Override
                    public void onColorChanged(int color) {
                        // apply new color
                    }
                });
                dialog.show();