Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nitiwari-dev/android-support-v7-palette-example
Demo to extract color from bitmap using android support v7 palette
https://github.com/nitiwari-dev/android-support-v7-palette-example
android background-photos bitmap coderconsole extract extract-colors palette palette-colors palette-generation
Last synced: about 2 months ago
JSON representation
Demo to extract color from bitmap using android support v7 palette
- Host: GitHub
- URL: https://github.com/nitiwari-dev/android-support-v7-palette-example
- Owner: nitiwari-dev
- Created: 2015-10-21T11:55:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-21T13:09:18.000Z (about 9 years ago)
- Last Synced: 2023-02-27T13:26:17.953Z (almost 2 years ago)
- Topics: android, background-photos, bitmap, coderconsole, extract, extract-colors, palette, palette-colors, palette-generation
- Language: Java
- Homepage: http://code2concept.blogspot.in/2015/10/android-support-v7-palette-demo.html
- Size: 387 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# android-support-v7-palette-example
This is demostration of how to extract color from `bitmap` using android palette support library. As show below.
![first_01](https://cloud.githubusercontent.com/assets/10304040/10637105/3df3df5a-7821-11e5-8706-91c39ef6ea57.png)
![second](https://cloud.githubusercontent.com/assets/10304040/10637104/3df3c0c4-7821-11e5-9fee-0a0769f51df8.png)
![third](https://cloud.githubusercontent.com/assets/10304040/10637103/3df1cbc0-7821-11e5-9fb0-479b1e2f9c56.png)Steps 1: Add this into build.gradle.
compile 'com.android.support:palette-v7:+'
Step 2: Provide the bitmap to fecth `swatch` list containing `rgb` values as shown below.
Palette.from(bitmap).generate(new Palette.PaletteAsyncListener() {
@Override
public void onGenerated(Palette palette) {
swatchesList = palette.getSwatches();
}
});
}We get `titleText`, `bodyText`, `RGB`, `HSL (Hue, Saturation, Lightness)` respectively.
This example too extract the `rgb` value from the `drawable` and display it into the `background` of parent layout using interval of 1sec.