duanhong169 / Colorpicker
Licence: apache-2.0
🎨 A color picker for Android. Pick a color using color wheel and slider (HSV & alpha).
Stars: ✭ 254
Programming Languages
java
68154 projects - #9 most used programming language
Labels
Projects that are alternatives of or similar to Colorpicker
andColorPicker
Color picker library for Android
Stars: ✭ 233 (-8.27%)
Mutual labels: color-picker, android-view
flutter material color picker
Material color picker, you can customize colors. Selection in two step, first main color and after shades.
Stars: ✭ 68 (-73.23%)
Mutual labels: color-picker
javascript-color-gradient
Lightweight JavaScript library, used to generate an array of color gradients, between start and finish colors.
Stars: ✭ 54 (-78.74%)
Mutual labels: color-picker
przm
🎨 A simple, yet feature rich color picker and manipulator
Stars: ✭ 19 (-92.52%)
Mutual labels: color-picker
ChinaMapView
自定义View,可缩放、可平移、可点击的中国地图,有中国地图的全部省份,具备每个省份的点击接口
Stars: ✭ 1,211 (+376.77%)
Mutual labels: android-view
color-generate
An awesome theme color generation scheme.
Stars: ✭ 165 (-35.04%)
Mutual labels: color-picker
SignatureView
【Android View】:好用的Android电子签名板,能保存所签名的图片
Stars: ✭ 89 (-64.96%)
Mutual labels: android-view
SwiftUI-Color-Kit
SwiftUI Color Pickers, Gradient Pickers And All The Utilities Needed To Make Your Own!
Stars: ✭ 120 (-52.76%)
Mutual labels: color-picker
ColorPicker
Customizable Color Picker control for WPF
Stars: ✭ 57 (-77.56%)
Mutual labels: color-picker
Litrato
Android photo editing app with various filters and tools. Included advanced features like masking, histogram, color picker, EXIF viewer...
Stars: ✭ 54 (-78.74%)
Mutual labels: color-picker
adobe-color-picker
The rebuilt color picker of Adobe scripting for PS,AI,AE and so on.
Stars: ✭ 37 (-85.43%)
Mutual labels: color-picker
colorpicker
pure Angular.JS circle color-picker similar to google keep's color picker
Stars: ✭ 23 (-90.94%)
Mutual labels: color-picker
aframe-colorwheel-component
A-Frame Colorwheel. Based on A-Painter and A-Frame Material 🎨🅰
Stars: ✭ 16 (-93.7%)
Mutual labels: color-picker
Egorozh.ColorPicker
🎨🎨🎨 Best of the best ColorPicker on WPF and AvaloniaUI
Stars: ✭ 39 (-84.65%)
Mutual labels: color-picker
UIElements
Various scripts related to Unity UI Toolkit (UIElements).
Stars: ✭ 73 (-71.26%)
Mutual labels: color-picker
ColorPicker
English | 中文
A ColorPicker
for Android. Pick a color using color wheel and slider (HSV & alpha).
Gradle
dependencies {
implementation 'com.github.duanhong169:colorpicker:${latestVersion}'
...
}
Replace
${latestVersion}
with the latest version code. See releases.
Usage
ColorPickerPopup
Using new ColorPickerPopup.Builder(this)
.initialColor(Color.RED) // Set initial color
.enableBrightness(true) // Enable brightness slider or not
.enableAlpha(true) // Enable alpha slider or not
.okTitle("Choose")
.cancelTitle("Cancel")
.showIndicator(true)
.showValue(true)
.build()
.show(v, new ColorPickerPopup.ColorPickerObserver() {
@Override
public void onColorPicked(int color) {
v.setBackgroundColor(color);
}
@Override
public void onColor(int color, boolean fromUser) {
}
});
ColorPickerView
Using - Add
ColorPickerView
into your layout xml:
<top.defaults.colorpicker.ColorPickerView
android:id="@+id/colorPicker"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:enableBrightness="true"
app:enableAlpha="true"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
See
top_defaults_view_color_picker_attrs.xml
for all supported attributes.
- Implement
ColorObserver
and subscribe toColorPickerView
to receive color updates from theColorPickerView
:
colorPickerView.subscribe((color, fromUser) -> {
// use the color
});
- Set initial color:
colorPickerView.setInitialColor(0x7F313C93);
- Reset to initial color:
colorPickerView.reset();
See a complete usage in the app sample code.
License
Copyright 2018 Hong Duan
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].