For color lovers! A simple but powerful Android color picker

Overview

64px

#DEPRECATED

Credits for the logo goes to Hafiz Ahmmed (https://github.com/hafizahmmed)

ColorBox library

Download Android Arsenal API

Features

  • Dynamic color preview;
  • Change the color through Alpha, Red, Green, and Blue sliders;
  • Clearable recent colors;
  • Material palettes (>200 colors!);
  • ColorBox preference;
  • Themes (Light, Dark, Black);
  • Easy to implement;

ScreenShot

Sample Project

You can download the latest sample APK from this repo here: https://github.com/enricocid/ColorBox-library/blob/master/files/release/app-release.apk

Gradle Dependency

Repository

The Gradle dependency is available via jCenter. jCenter is the default Maven repository used by Android Studio.

The minimum API level supported by this library is API 21 (Lollipop).

Download

  • If You are using gradle:3.0+ You should use 'implementation' configuration. Add the following dependency to your project's build.gradle:
dependencies {
    // ... other dependencies here
    implementation 'com.github.enricocid:cbl:1.1.1'
}
  • For gradle versions < 3.0 use 'compile' configuration:
dependencies {
    // ... other dependencies here
    compile 'com.github.enricocid:cbl:1.1.1'
}

Usage

To display the color box simply:

ColorBox.showColorBox(String tag, Activity activity, int theme);

tag: it's a string used to identify the ColorBox.

theme: Possible values are:

ScreenShot

  • ColorBox.LIGHT;
  • ColorBox.DARK;
  • ColorBox.BLACK;

Usage instructions for Preferences

ScreenShot

In Your preferences XML add:

<com.github.colorbox.ColorBoxPreference android:key="the_key_u_want" android:title="@string/your_string"/>

note: don't forget to add a (different) key and a title for every ColorBoxPreference You add in Your preferences XML.

You can set the theme of the ColorBox by adding the setTheme attribute. The possible values are 1 and 2. The default value is 0, corresponding to the light theme (You don't need to specify this attribute if You want to keep the light theme).

  • For Dark theme (1):
<com.github.colorbox.ColorBoxPreference
app:setTheme="1"
android:key="the_key_u_want" android:title="@string/your_string"/>
  • For Black theme (2):
<com.github.colorbox.ColorBoxPreference 
app:setTheme="2"
android:key="the_key_u_want" android:title="@string/your_string"/>

In You Preference fragment (onResume) add this

@Override
    public void onResume() {
        super.onResume();

        ColorBox.registerPreferenceUpdater(Activity activity);
    }

To retrieve the color:

int color = ColorBox.getColor(String tag, Context context);

Utilities:

ColorBox.getComplementaryColor(int colorToInvert)

Returns inverted color:

ScreenShot

ColorBox.getHexadecimal(int color)

Returns the hexadecimal code from color.

ColorBox.isColorDark(int color)

Determine if the color is dark or light.

THAT'S ALL FOLKS!

You might also like...
Utility library that extends Jetpack Compose Colors with Material Design2 colors, Color swatches like in Flutter
Utility library that extends Jetpack Compose Colors with Material Design2 colors, Color swatches like in Flutter

πŸš€πŸŒˆβ™Ύ Utility library that expands Compose Colors with Material Design2 colors, color swatches, Material Design 3 Tonal Palettes, color names, and utility functions to convert between HSL, HSV, RGB, HCT models and to HEX or from HEX

Android Material Design Colors

Android-Material-Design-Colors Android-Material-Design-Colors provides color definitions of the Material Design. Demo Usage R.color.md_color_value or

A list of most useful resources for designing android apps such as all material colors and dimens, 180 Gradient background + html, social, flat, fluent, metro colors.

Timer UI Login UI Fitness UI Material-Resources-Library A list of most useful resources for designing android apps such as all material colors and dim

🎨 A color picker for Android. Pick a color using color wheel and slider (HSV & alpha).
🎨 A color picker for Android. Pick a color using color wheel and slider (HSV & alpha).

ColorPicker English | δΈ­ζ–‡ A ColorPicker for Android. Pick a color using color wheel and slider (HSV & alpha). Gradle dependencies { implementation

Food Lovers App With Kotlin
Food Lovers App With Kotlin

Projeto: Site de Filmes Status: Em andamento Segundo projeto em andamento em Android com Kotlin! dessa vez estou desenvolvendo um aplicativo para aman

Android Country Picker is a Kotlin-first, flexible and powerful Android library that allows to integrate Country Picker with just a few lines.
Android Country Picker is a Kotlin-first, flexible and powerful Android library that allows to integrate Country Picker with just a few lines.

1. Add dependency dependencies { implementation 'com.hbb20:android-country-picker:X.Y.Z' } For latest version, 2. Decide your use-case

A color picker and a color preference for use in Android applications.
A color picker and a color preference for use in Android applications.

HSV-Alpha Color Picker for Android This library implements a color picker and a color preference for use in Android applications. Features I couldn't

Simple, Powerful and Beautiful Android Image/Video/Audio Picker 😎
Simple, Powerful and Beautiful Android Image/Video/Audio Picker 😎

Simple, Powerful and Beautiful Android Image/Video/Audio Picker 😎 Features 😍 No need check storage permission πŸ˜‰ Single and multiple selection Suppo

A minimalist but powerful productivity timer designed to keep you focused and free of distractions.
A minimalist but powerful productivity timer designed to keep you focused and free of distractions.

Goodtime A minimalist but powerful productivity timer designed to keep you focused and free of distractions. Alternate between focused work sessions a

Theme for VSCode and JetBrains IDEs, based on morhetz/gruvbox but with a plainer color palette for syntax highlighting.

gruvbox-plain Theme for VSCode and JetBrains IDEs, based on morhetz/gruvbox but with a plainer color palette for syntax highlighting. Syntax Colors gr

Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.
Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.

Pix (WhatsApp Style Image and Video Picker) Pix is a WhatsApp image picker replica. with this you can integrate a image picker just like WhatsApp. Upc

Facebook-Styled-Image-Picker - Facebook Styled Image Picker

Facebook-Styled-Image-Picker Facebook Styled Gallery Files picker. One or multip

Picker-kt - Media picker library powered by Jetpack Compose
Picker-kt - Media picker library powered by Jetpack Compose

ANDROID LIBRARY PickerKT A media picker library for Android apps powered by Jetp

Unicorn File Picker is a library designed to package a powerful file selector for android.
Unicorn File Picker is a library designed to package a powerful file selector for android.

A simple, documented, and contribution-friendly File Picker for Android.

Color picker library for Android
Color picker library for Android

andColorPicker β€” Color Picker library for Android πŸ₯‘ Handy, 🐍 flexible, and ⚑ lightning-fast Android color picker views and utilities. πŸ’Š Features Cl

Beautiful color picker dialog for Android 9+
Beautiful color picker dialog for Android 9+

Color-O-Matic Beautiful Color Picker dialog for Android 9+ based on VintageChroma by Pavel Sikun. Screenshots at the end of the file. Repository Add t

A color picker seekbar for android.
A color picker seekbar for android.

ColorSeekBar A color picker seekbar for android. Download Use Gradle compile 'com.divyanshu.colorseekbar:colorseekbar:1.0.2' or Maven dependency

 Color Picker β€” beautiful library for Android
Color Picker β€” beautiful library for Android

Color Picker β€” beautiful library for Android Features Simple dialog builder ARGB, RGB & HSV color models Dark theme support Sliders with gradient back

Alwan 🎨 is an Android Jetpack Compose color picker library.
Alwan 🎨 is an Android Jetpack Compose color picker library.

Alwan Alwan is an Android Jetpack Compose color picker library. Preview Recording.mp4 Download Gradle: dependencies { implementation 'com.raedapps:a

Owner
Enrico D'Ortenzio
Chemist (MS)
Enrico D'Ortenzio
Color picker library for Android

andColorPicker β€” Color Picker library for Android ?? Handy, ?? flexible, and ⚑ lightning-fast Android color picker views and utilities. ?? Features Cl

side.codes 216 Jan 7, 2023
Beautiful color picker dialog for Android 9+

Color-O-Matic Beautiful Color Picker dialog for Android 9+ based on VintageChroma by Pavel Sikun. Screenshots at the end of the file. Repository Add t

null 43 Jun 5, 2022
Color Picker β€” beautiful library for Android

Color Picker β€” beautiful library for Android Features Simple dialog builder ARGB, RGB & HSV color models Dark theme support Sliders with gradient back

Dmitriy 35 Dec 20, 2022
A component that provides an HSV color picker, written in Jetpack compose🎨

A component that provides an HSV color picker, written in Jetpack compose??

GoDaddy 270 Dec 30, 2022
Jetpack Compose Color Picker

Bundle of Stylish customizable Color pickers, selectors, colorful sliders written with Jetpack Compose enables users to choose from HSL, HSV or RGB color modes to pick Solid colors or gradients.

Smart Tool Factory 34 Nov 29, 2022
Color.kt is a modern color science library for Kotlin Multiplatform and Java.

Color.kt is a modern color science library for Kotlin Multiplatform and Java. It includes modern perceptually-uniform color spaces and color appearance models, such as Oklab and ZCAM.

Danny Lin 45 Oct 11, 2022
Color.kt is a modern color science library for Kotlin Multiplatform and Java.

Color.kt is a modern color science library for Kotlin Multiplatform and Java. It includes modern perceptually-uniform color spaces and color

SOSP-OS 0 Jan 21, 2022
App-level wallpaper color palette generation for Android 5.0+

MonetCompat is an app-level implementation of kdrag0n's custom Monet implementation, based on his android12-extensions module. With MonetCompat you can generate color palettes from a user's wallpaper and use them anywhere in your app. It supports Android 5.0 and above (in Palette compatibility mode) and Android 8.1 and above in normal mode.

Kieron Quinn 145 Dec 18, 2022
Match a wallpaper to your color scheme

ImageTheming Change the color palette of an image to match your theme. Getting Started Use java -jar path/to/ImageTheming.jar -h to get all available

null 230 Dec 25, 2022
A modern color science library for Kotlin Multiplatform and Java

Color.kt Color.kt is a modern color science library for Kotlin Multiplatform and Java. It includes modern perceptually-uniform color spaces and color

Weeb Project (WIP) 0 Oct 21, 2021