# HoloColorPicker
**Repository Path**: ouyangpengdev/HoloColorPicker
## Basic Information
- **Project Name**: HoloColorPicker
- **Description**: An Android Holo themed colorpicker designed by Marie Schweiz
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-03-23
- **Last Updated**: 2021-03-23
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
圆环形颜色选择器,可以改变颜色饱和度来选择颜色。
选择颜色时,可以用手指沿着圆环滑动一个滑块,从而选择颜色。
Android Holo ColorPicker
Marie Schweiz made a beautifull new design for the Holo ColorPicker which added a lot of new functionality.
You can now set the Saturation and Value of a color.
Also its possible to set the Opacity for a color.
You can also set the last selected color and see the difference with the new selected color.
Demo can be found on my Google Drive [here](https://docs.google.com/file/d/0BwclyDTlLrdXRzVnTGJvTlRfU2s/edit) if interested. the code of the sample can be found at a gist [here](https://gist.github.com/LarsWerkman/4754528)


Documentation
UDPATE
Added support for a SaturationBar and ValueBar.
To add the ColorPicker to your layout add this to your xml
```xml
```
To add a Saturation/Value bar to your layout add this to your xml
```xml
```
The same goes for the Opacity bar
```xml
```
Saturation bar
```xml
```
and a Value bar
```xml
```
To connect the bars with the colorpicker and to get the selected color.
```java
ColorPicker picker = (ColorPicker) findViewById(R.id.picker);
SVBar svBar = (SVBar) findViewById(R.id.svbar);
OpacityBar opacityBar = (OpacityBar) findViewById(R.id.opacitybar);
SaturationBar saturationBar = (SaturationBar) findViewById(R.id.saturationbar);
ValueBar valueBar = (ValueBar) findViewById(R.id.valuebar);
picker.addSVBar(svBar);
picker.addOpacityBar(opacityBar);
picker.addSaturationBar(saturationBar);
picker.addValueBar(valueBar);
//To get the color
picker.getColor();
//To set the old selected color u can do it like this
picker.setOldCenterColor(picker.getColor());
// adds listener to the colorpicker which is implemented
//in the activity
picker.setOnColorChangedListener(this);
```
Dependency
Adding it as a dependency to your project.
dependencies {
compile 'com.larswerkman:HoloColorPicker:1.1'
}
License
Copyright 2012 Lars Werkman
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.
Devoleped By
**Lars Werkman**