Skip to content

🔥 Android lightweight, animated and easy to use ColorPicker

Notifications You must be signed in to change notification settings

mejdi14/AndroidColorPicker

Repository files navigation

Welcome to AndroidColorPicker Library 👋

gitmoji-changelog gitmoji-changelog License: MIT

✨ Demo

Installation

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

🔨Dependency

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
	...
	implementation 'com.github.mejdi14:AndroidColorPicker:1.0.2'
}

🔥How to use with kotlin

    MHColorsDialog(this)
                .setColorListener { color, colorHex ->
                    // color and colorHex are the chosen color
                }
                .show()

☕How to use with Java

  MHColorsDialog mhColorsDialog=new MHColorsDialog(MainActivity.this);
                mhColorsDialog.setColorListener(new ColorListener() {
                    @Override
                    public void onColorSelected(int color, @NotNull String colorHex) {
                          // color and colorHex are the chosen color
                    }
                });
                mhColorsDialog.show();

🎨Customization

Dark Mode

sample

 .withDarkMode()

Add new colors

 .addColors(colorsList,ColorsPosition.START)

where colorsList is an ArrayList (every Int represent a color)
ColorsPosition is where your colors should be in the final list of colors (Start or End)

Use your own colors

 .withMyOwnColors(colorsList)

where colorsList is an ArrayList (every Int represent a color)
this will make the library ignore the default colors and use only your colors from colorsList

🤝 Contributing

Contributions, issues and feature requests are welcome.
Feel free to check [issues page] if you want to contribute.

Author

👤 Mejdi Hafiane

Show your support

Please ⭐️ this repository if this project helped you!

📝 License

Copyright © 2019 Mejdi Hafiane.
This project is MIT licensed.