All Projects → rtugeek → Colorseekbar

rtugeek / Colorseekbar

A colorful SeekBar for picking color

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Colorseekbar

Vanilla Colorful
A tiny color picker custom element for modern web apps (2.7 KB) 🎨
Stars: ✭ 467 (+87.55%)
Mutual labels:  color, colorpicker
Kallewheel
A custom color wheel extension for Adobe Photoshop
Stars: ✭ 16 (-93.57%)
Mutual labels:  color, colorpicker
Easysignseekbar
本库主要提供一个漂亮而强大的自定义SeekBar,进度变化由提示牌 (sign)展示,具有强大的属性设置,支持设置section(节点)、mark(标记)、track(轨迹)、thumb(拖动块)、progress(进度)、sign(提示框)等功能
Stars: ✭ 629 (+152.61%)
Mutual labels:  custom-view, seekbar
Swagpoints
An Android custom circular SeekBar that supports max/min range and step settings.
Stars: ✭ 300 (+20.48%)
Mutual labels:  custom-view, seekbar
Waveformseekbar
Android Waveform SeekBar library
Stars: ✭ 120 (-51.81%)
Mutual labels:  customview, seekbar
Farge
Click on a pixel on your screen and show its color value
Stars: ✭ 307 (+23.29%)
Mutual labels:  color, colorpicker
Colorpicker
A mininal but complete colorpicker desktop app
Stars: ✭ 766 (+207.63%)
Mutual labels:  color, colorpicker
ColorPickView
🐾一个自定义的颜色选择view
Stars: ✭ 19 (-92.37%)
Mutual labels:  color, colorpicker
Bootstrap Colorpicker
Bootstrap Colorpicker is a modular color picker plugin for Bootstrap.
Stars: ✭ 1,351 (+442.57%)
Mutual labels:  color, colorpicker
Croller
A circular seekbar for Android, with a control knob! (for the lack of a better word).
Stars: ✭ 1,088 (+336.95%)
Mutual labels:  custom-view, seekbar
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (+8.84%)
Mutual labels:  color, colorpicker
Efcolorpicker
A lightweight color picker in Swift.
Stars: ✭ 205 (-17.67%)
Mutual labels:  color, colorpicker
UnityColorPicker
A standalone color picker asset for Unity
Stars: ✭ 70 (-71.89%)
Mutual labels:  color, colorpicker
Pickr
🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
Stars: ✭ 3,759 (+1409.64%)
Mutual labels:  color, colorpicker
double-avatar-view
Instagram-like double avatar view with cropping
Stars: ✭ 31 (-87.55%)
Mutual labels:  custom-view, customview
Codeview Android
Display code with syntax highlighting ✨ in native way.
Stars: ✭ 748 (+200.4%)
Mutual labels:  custom-view, customview
AACustomFont
[UNMAINTAINED] AACustomFont is a lightweight custom font binder in XML directly in TextView, Button, EditText, RadioButton, CheckBox tags. The library is aimed to avoid custom views for custom fonts in XML and to minimize the JAVA code for setting the TypeFaces for each view.
Stars: ✭ 76 (-69.48%)
Mutual labels:  custom-view, customview
global-color-picker
start the script and click anywhere to get rgb value at the cursor location
Stars: ✭ 31 (-87.55%)
Mutual labels:  color, colorpicker
Testleavesloading
Android 自定义 View 之 LeavesLoading
Stars: ✭ 55 (-77.91%)
Mutual labels:  custom-view, customview
React Colorpickr
A themeable colorpicker with HSL and RGB support for React
Stars: ✭ 180 (-27.71%)
Mutual labels:  color, colorpicker

ColorSeekbar

ScreenShot:

Attrs

attr format default
colorSeeds references
colorBarPosition integer 0
alphaBarPosition integer 0
maxPosition integer 100
bgColor color TRANSPARENT
barHeight dimension 2dp
barMargin dimension 5dp
thumbHeight dimension 30dp
showAlphaBar boolean false
showColorBar boolean true
isVertical boolean false
disabledColor color Color.GRAY
showThumb boolean true
barRadius dimension 0px

Gradle:

Release API Android Arsenal

Step 1. Add the JitPack repository in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

Step 2. Add the dependency

implementation 'com.github.rtugeek:colorseekbar:1.7.7'

Usage

XML

<com.rtugeek.android.colorseekbar.ColorSeekBar
  android:id="@+id/colorSlider"
  android:layout_width="match_parent"
  app:colorSeeds="@array/material_colors"
  android:layout_height="wrap_content" />

JAVA

colorSeekBar.setMaxPosition(100);
colorSeekBar.setColorSeeds(R.array.material_colors); // material_colors is defalut included in res/color,just use it.
colorSeekBar.setColorBarPosition(10); //0 - maxValue
colorSeekBar.setAlphaBarPosition(10); //0 - 255
colorSeekBar.setPosition(10,10); // An easier way to set ColorBar and AlphaBar

colorSeekBar.setShowAlphaBar(true);
colorSeekBar.setBarHeight(5); //5dpi
colorSeekBar.setThumbHeight(30); //30dpi
colorSeekBar.setBarMargin(10); //set the margin between colorBar and alphaBar 10dpi

Listener

colorSeekBar.setOnColorChangeListener(new ColorSeekBar.OnColorChangeListener() {
        @Override
        public void onColorChangeListener(int colorBarPosition, int alphaBarPosition, int color) {
            textView.setTextColor(color);
            //colorSeekBar.getAlphaValue();
        }
});

Vertical Bar

<com.rtugeek.android.colorseekbar.ColorSeekBar
  android:id="@+id/colorSlider"
  android:layout_width="match_parent"
  app:colorSeeds="@array/material_colors"
  app:isVertical="true"
  android:layout_height="wrap_content" />

getColor() issue

Render flow:
1.Activity->onCreate();
2.Activity->onResume();
3.ColorSeekBar->onMeasure();
4.ColorSeekBar->onSizeChanged();
5.ColorSeekBar->init();
6.ColorSeekBar->onMeasure();
7.ColorSeekBar->onDraw();

getColor()/getColors()/getColorIndexPosition() do not work correct until onDraw() method invoked. So, If you want to get color or something else form ColorSeekBar on Activity.onCreate() function, just do:

mColorSeekBar.setOnInitDoneListener(new ColorSeekBar.OnInitDoneListener() {
    @Override` `
    public void done() {
        mColorSeekBar.getColorIndexPosition(mColor);
        //mColorSeekBar.getColors();
        //mColorSeekBar.getColor();
    }
});

Spread the word

License

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                Version 2, December 2004

Copyright (C) 2004 Leon Fu <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

 0. You just DO WHAT THE FUCK YOU WANT TO.
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].