Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MichaelEvans/ColorArt
iTunes 11-style color matching code for Android
https://github.com/MichaelEvans/ColorArt
Last synced: 3 months ago
JSON representation
iTunes 11-style color matching code for Android
- Host: GitHub
- URL: https://github.com/MichaelEvans/ColorArt
- Owner: MichaelEvans
- License: apache-2.0
- Created: 2013-11-26T02:14:02.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-10-30T22:30:44.000Z (about 4 years ago)
- Last Synced: 2024-06-30T22:07:21.889Z (4 months ago)
- Language: Java
- Homepage: http://www.michaelevans.org/blog/2013/12/12/colorart-a-library-to-do-itunes-11-style-color-matching-for-android/
- Size: 3.54 MB
- Stars: 899
- Watchers: 49
- Forks: 140
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
##About
ColorArt is a library that uses an image to create a themed image/text display. It's a port of the idea found on the [Panic Blog](http://www.panic.com/blog/itunes-11-and-colors/) to work on Android.
##Usage
(ColorArt is supported on Android 2.1+.)
Add ColorArt as a dependency to your build.gradle file:
```
compile 'org.michaelevans.colorart:library:0.0.3'
```Then you can use the library like this:
```
// get a bitmap and analyze it
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.album);
ColorArt colorArt = new ColorArt(bitmap);// get the colors
colorArt.getBackgroundColor()
colorArt.getPrimaryColor()
colorArt.getSecondaryColor()
colorArt.getDetailColor()
```###FadingImageView
```
mFadingImageView.setBackgroundColor(colorArt.getBackgroundColor(), FadingImageView.FadeSide.LEFT);
```
This will set the fading edge on the left side, with that background color. You can also enable/disable the fade with:```
mImageView.setFadeEnabled(true/false);
```##Screenshots
![Jim Noir](https://github.com/MichaelEvans/ColorArt/raw/master/img/jim_noir.png)
![Ping Pong Orchestra](https://github.com/MichaelEvans/ColorArt/raw/master/img/ping_pong_orchestra.png)
![Hotel Shampoo](https://github.com/MichaelEvans/ColorArt/raw/master/img/hotel_shampoo.png)##License
```
Copyright 2015 Michael EvansLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/MichaelEvans/colorart/trend.png)](https://bitdeli.com/free "Bitdeli Badge")