All Projects → side-codes → andColorPicker

side-codes / andColorPicker

Licence: Apache-2.0 license
Color picker library for Android

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to andColorPicker

vscode-color
Helper with GUI to generate color codes such as CSS color notations.
Stars: ✭ 88 (-62.23%)
Mutual labels:  color-picker, hsl, rgb, cmyk
ColorMinePortable
ColorMinePortable
Stars: ✭ 37 (-84.12%)
Mutual labels:  lab, hsl, rgb, cmyk
React Colorpickr
A themeable colorpicker with HSL and RGB support for React
Stars: ✭ 180 (-22.75%)
Mutual labels:  color-picker, hsl, rgb, colorpicker
colorsys.rs
Lib for modifying colors and converting to other spaces
Stars: ✭ 28 (-87.98%)
Mutual labels:  hsl, rgb, cmyk
tc-lib-color
PHP library to manipulate various color representations
Stars: ✭ 19 (-91.85%)
Mutual labels:  hsl, rgb, cmyk
colors-convert
🦚 A simple colors library
Stars: ✭ 15 (-93.56%)
Mutual labels:  hsl, rgb, cmyk
ColorHelper
No description or website provided.
Stars: ✭ 34 (-85.41%)
Mutual labels:  hsl, rgb, cmyk
Sorted Colors
A tool to sort the named CSS colors in a way that it shows related colors together
Stars: ✭ 167 (-28.33%)
Mutual labels:  hsl, rgb, colorpicker
global-color-picker
start the script and click anywhere to get rgb value at the cursor location
Stars: ✭ 31 (-86.7%)
Mutual labels:  color-picker, rgb, colorpicker
Colorpicker
A mininal but complete colorpicker desktop app
Stars: ✭ 766 (+228.76%)
Mutual labels:  color-picker, rgb, colorpicker
Color Studio
It is too hard to build coherent and accessible themes with the right colors. This should help.
Stars: ✭ 289 (+24.03%)
Mutual labels:  color-picker, hsl, rgb
Colorpickerview
🎨 Android colorpicker for getting colors from any images by tapping on the desired color.
Stars: ✭ 1,042 (+347.21%)
Mutual labels:  color-picker, android-ui, colorpicker
ColorPicker
Customizable Color Picker control for WPF
Stars: ✭ 57 (-75.54%)
Mutual labels:  color-picker, hsl, rgb
Hsluv Dart
Dart port of HSLuv, a human-friendly alternative to HSL based on human experiments.
Stars: ✭ 49 (-78.97%)
Mutual labels:  color-picker, hsl, rgb
SignatureView
【Android View】:好用的Android电子签名板,能保存所签名的图片
Stars: ✭ 89 (-61.8%)
Mutual labels:  view, android-ui, android-view
Edgetranslucent
Android 任意View边沿渐变透明
Stars: ✭ 461 (+97.85%)
Mutual labels:  view, android-view
Android Slidr
Another android slider / seekbar, but different :-)
Stars: ✭ 326 (+39.91%)
Mutual labels:  view, seekbar
Alfred-Colors-workflow
hex <=> rgb <=> hsl
Stars: ✭ 28 (-87.98%)
Mutual labels:  hsl, rgb
Happybubble
💭BubbleLayout随意变化的气泡布局、消息对话框,可定制颜色,背景、弧度、尖角弧度、边框等等。BubbleDialog气泡弹窗根据点击View的位置定位它的弹窗位置,BubbleDialog可定制方向等!(BubbleLayout changes freely,BubbleDialog click on the location of View positioning its location,BubbleDialog can be customized directions.)
Stars: ✭ 487 (+109.01%)
Mutual labels:  view, android-ui
Slidingrootnav
DrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible.
Stars: ✭ 2,939 (+1161.37%)
Mutual labels:  view, android-ui

andColorPicker — Color Picker library for Android

🥑 Handy, 🐍 flexible, and lightning-fast Android color picker views and utilities.

andColorPicker logo

💊 Features

  • Clean, easy-to-use components and API
  • High performance
  • Material styling in mind
  • Standard Android SDK view family
  • Wide color models support
  • Tooling and utilities
  • Alpha channel support
  • Cutting edge tech stack
  • Active development and support

🔨 Setup

Gradle dependency:

implementation "codes.side:andcolorpicker:0.6.2"

🎨 Picker types

HSL (hue, saturation, lightness)

  • Add color model description

Layout XML Snippet

Basic HSL components:

<codes.side.andcolorpicker.hsl.HSLColorPickerSeekBar
  android:id="@+id/hueSeekBar"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  app:hslColoringMode="pure"
  app:hslMode="hue" />

Supported hslMode values:

  • hue (default)
  • saturation
  • lightness

Supported hslColoringMode values:

  • pure (default)
  • output

Alpha component:

<codes.side.andcolorpicker.alpha.HSLAlphaColorPickerSeekBar
  android:id="@+id/alphaSeekBar"
  android:layout_width="match_parent"
  android:layout_height="wrap_content" />

Kotlin Snippet

// Configure color model programmatically
hueSeekBar.mode = Mode.MODE_HUE // Mode.MODE_SATURATION, Mode.MODE_LIGHTNESS

// Configure coloring mode programmatically
hueSeekBar.coloringMode = ColoringMode.PURE_COLOR // ColoringMode.OUTPUT_COLOR

// Group pickers with PickerGroup to automatically synchronize color across them
val group = PickerGroup<IntegerHSLColor>().also {
  it.registerPickers(
    hueSeekBar,
    saturationSeekBar,
    lightnessSeekBar,
    alphaSeekBar
  )
}

// Get current color immediately
Log.d(
  TAG,
  "Current color is ${hueSeekBar.pickedColor}"
)

// Listen individual pickers or groups for changes
group.addListener(
  object : HSLColorPickerSeekBar.DefaultOnColorPickListener() {
    override fun onColorChanged(
      picker: ColorSeekBar<IntegerHSLColor>,
      color: IntegerHSLColor,
      value: Int
    ) {
      Log.d(
        TAG,
        "$color picked"
      )
      swatchView.setSwatchColor(
        color
      )
    }
  }
)

// Set desired color programmatically
group.setColor(
  IntegerHSLColor().also {
    it.setFromColorInt(
      Color.rgb(
        28,
        84,
        187
      )
    )
  }
)

// Set color components programmatically
hueSeekBar.progress = 50

RGB (red, green, blue)

Properties

  • View name: RGBColorPickerSeekBar
  • app:rgbMode for RGB component selection

LAB

Properties

  • View name: LABColorPickerSeekBar
  • app:labMode for LAB component selection

CMYK (cyan, magenta, yellow, key)

Properties

  • View name: CMYKColorPickerSeekBar
  • app:cmykMode for CMYK component selection
  • app:cmykColoringMode for coloring mode selection

Supported cmykMode values:

  • cyan (default)
  • magenta
  • yellow
  • black

Supported cmykColoringMode values:

  • pure (default)
  • output

Swatches

SwatchView component:

<codes.side.andcolorpicker.view.swatch.SwatchView
  android:id="@+id/swatchView"
  android:layout_width="match_parent"
  android:layout_height="wrap_content" />

Kotlin Snippet:

swatchView.setSwatchPatternTint(
  Color.LTGRAY
)

swatchView.setSwatchColor(
  IntegerHSLColor().also {
    it.setFromColorInt(
      ColorUtils.setAlphaComponent(
        Color.MAGENTA,
        128
      )
    )
  }
)

📝 License

Copyright 2020 Illia Achour

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].