All Projects → duanhong169 → Colorpicker

duanhong169 / Colorpicker

Licence: apache-2.0
🎨 A color picker for Android. Pick a color using color wheel and slider (HSV & alpha).

Programming Languages

java
68154 projects - #9 most used programming language

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
a-color-picker
A color picker for web app
Stars: ✭ 97 (-61.81%)
Mutual labels:  color-picker
ColorPickView
🐾一个自定义的颜色选择view
Stars: ✭ 19 (-92.52%)
Mutual labels:  color-picker
color-generate
An awesome theme color generation scheme.
Stars: ✭ 165 (-35.04%)
Mutual labels:  color-picker
CustomViewCollection
Android自定义View库
Stars: ✭ 17 (-93.31%)
Mutual labels:  android-view
SignatureView
【Android View】:好用的Android电子签名板,能保存所签名的图片
Stars: ✭ 89 (-64.96%)
Mutual labels:  android-view
extensions
Angular Material Extensions Library.
Stars: ✭ 203 (-20.08%)
Mutual labels:  color-picker
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
color-picker
A color picker app made in flutter
Stars: ✭ 46 (-81.89%)
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 gitHub release platform Android Arsenal license

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

Using ColorPickerPopup

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) {

            }
        });

Using ColorPickerView

  • 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 to ColorPickerView to receive color updates from the ColorPickerView:
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].