This is a small library for your Android application to enable the users to select an arbitrary color. I've abstracted this to a widget that can be added to any View.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Android Color Picker
aka AmbilWarna library ("Pick a Color" in Indonesian)

This is a small library for your application to enable the users to select an arbitrary color. It is currently used in the free Bible applications for Android ( It is also used by the >250,000 downloads app DigiClock Widget.

For example, your application has a feature to customize the color of some background, text, or maybe for a painting application where the user should be able to select different color for painting or filling.


This is an Android Library Project where you can include it into your main project.

How to use
Create a color picker dialog by calling the following constructor, and then show it.

AmbilWarnaDialog(Context context, int color, OnAmbilWarnaListener listener)
as follows:

    // initialColor is the initially-selected color to be shown 
    // in the rectangle on the left of the arrow.
    // for example, 0xff000000 is black, 0xff0000ff is blue. 
    // Please be aware of the initial 0xff which is the alpha.
    AmbilWarnaDialog dialog = AmbilWarnaDialog(this, initialColor,
            new OnAmbilWarnaListener() {
        public void onOk(AmbilWarnaDialog dialog, int color) {
                // color is the color selected by the user.
        public void onCancel(AmbilWarnaDialog dialog) {
                // cancel was selected by the user

Pascal Cans (

See also other projects for Android:

Context Menu with Icons