https://github.com/MichaelEvans/ColorArt
iTunes 11-style color matching code for Android
https://github.com/MichaelEvans/ColorArt
Last synced: 12 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 (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-10-30T22:30:44.000Z (over 5 years ago)
- Last Synced: 2024-06-30T22:07:21.889Z (about 2 years 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
- awesome-android-ui - https://github.com/MichaelEvans/ColorArt
- awesome-android-libraries - ColorArt - style color matching code for Android (Theme / Skin)
- android-awesome-libraries - ColorArt
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



##License
```
Copyright 2015 Michael Evans
Licensed 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 at
http://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.
```
[](https://bitdeli.com/free "Bitdeli Badge")