A full featured Color picker Library for Android! Just like the one in Photoshop!
Tested with APIv11, but will most probably work with earlier versions as well.
The library is posted on jcenter. So, just the following code should be enough to get you started:
Place this in your app module's build.gradle file:
dependencies {
compile 'com.azeesoft.lib.colorpicker:colorpicker:1.0.6@aar'
}
If there is any error while building the project using the above mentioned step, add the following code in that build.gradle file and build again:
repositories {
maven {
url 'https://dl.bintray.com/azeesoft/maven'
}
}
After successful build, you can use ColorPickerDialog as a part of your project.
To create a default ColorPickerDialog with Light theme, use
ColorPickerDialog colorPickerDialog= ColorPickerDialog.createColorPickerDialog(this);
To create a ColorPickerDialog with Dark theme, use
ColorPickerDialog colorPickerDialog= ColorPickerDialog.createColorPickerDialog(this,ColorPickerDialog.DARK_THEME);
Set an OnColorPickedListener to call when the color is picked:
colorPickerDialog.setOnColorPickedListener(new ColorPickerDialog.OnColorPickedListener() {
@Override
public void onColorPicked(int color, String hexVal) {
//Your code here
}
});
Customize the colorPickerDialog if needed using appropriate methods and show the dialog:
colorPickerDialog.setHexaDecimalTextColor(Color.parse("#ffffff")); //There are many functions like this
colorPickerDialog.show();
To create a ColorPickerDialog with Custom theme, create a new style with any of the ColorPicker themes as parent and use the following attributes:
cp_showOpacityBar (boolean) : Show/Hide Opacity Bar
Use any of the following as parent:
For eg:
<style name="CustomColorPicker" parent="ColorPicker">
<item name="cp_backgroundColor">#4745e5</item>
<item name="cp_hexaDecimalTextColor">#000046</item>
<item name="cp_colorComponentsTextColor">#fff</item>
<item name="cp_positiveActionTextColor">@color/colorAccent</item>
<item name="cp_negativeActionTextColor">@color/colorPrimaryDark</item>
<item name="cp_sliderThumbColor">#accc</item>
</style>
ColorPickerDialog colorPickerDialog = ColorPickerDialog.createColorPickerDialog(this,R.style.CustomColorPicker);
colorPickerDialog.setOnColorPickedListener(new ColorPickerDialog.OnColorPickedListener() {
@Override
public void onColorPicked(int color, String hexVal) {
System.out.println("Got color: " + color);
System.out.println("Got color in hex form: " + hexVal);
// Make use of the picked color here
}
});
colorPickerDialog.show();






$ claude mcp add AndroidPhotoshopColorPicker \
-- python -m otcore.mcp_server <graph>