Skip to content

Madrapps/EyeDropper

Repository files navigation

EyeDropper

Build Status Download

An android library to pick colors from any image loaded in an ImageView or anything drawn on a Custom View

preview

Download

repositories {
  jcenter() // or mavenCentral()
}

dependencies {
  compile 'com.github.madrapps:eyedropper:1.1.0'
}

Usage

To pick color from any view (ImageView or Custom View) in your layout add the following to your code:

final View targetView = findViewById(R.id.targerView); // Any view from which you want to pick color
new EyeDropper(targetView, new ColorSelectionListener() {
  @Override
  public void onColorSelected(@ColorInt int color) {
    // color is the color selected when you touch the targetView
    (findViewById(R.id.colorSlot)).setBackgroundColor(color);
  }
});

License

EyeDropper by Madrapps is licensed under a Apache License 2.0.

About

An android library to pick colors from any image loaded in an ImageView or anything drawn on a Custom View

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages