{"id":18487627,"url":"https://github.com/skydoves/ColorPickerPreference","last_synced_at":"2025-04-08T20:31:39.051Z","repository":{"id":46246290,"uuid":"121114137","full_name":"skydoves/ColorPickerPreference","owner":"skydoves","description":"🎨 A library that lets you implement ColorPicker, ColorPickerDialog, ColorPickerPreference. ","archived":false,"fork":false,"pushed_at":"2021-11-04T12:00:39.000Z","size":610,"stargazers_count":480,"open_issues_count":7,"forks_count":51,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-04T17:09:45.150Z","etag":null,"topics":["android","android-library","colorpicker","colorpicker-preference","colorpickerdialog","colorpickerview","dialog","preference-screen","sharedpreferences","skydoves"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skydoves.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"skydoves","custom":["https://www.paypal.me/skydoves","https://www.buymeacoffee.com/skydoves"]}},"created_at":"2018-02-11T10:55:35.000Z","updated_at":"2025-01-16T14:24:08.000Z","dependencies_parsed_at":"2022-08-30T06:11:20.654Z","dependency_job_id":null,"html_url":"https://github.com/skydoves/ColorPickerPreference","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skydoves%2FColorPickerPreference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skydoves%2FColorPickerPreference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skydoves%2FColorPickerPreference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skydoves%2FColorPickerPreference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skydoves","download_url":"https://codeload.github.com/skydoves/ColorPickerPreference/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247923044,"owners_count":21018917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","colorpicker","colorpicker-preference","colorpickerdialog","colorpickerview","dialog","preference-screen","sharedpreferences","skydoves"],"created_at":"2024-11-06T12:50:35.498Z","updated_at":"2025-04-08T20:31:39.023Z","avatar_url":"https://github.com/skydoves.png","language":"Kotlin","readme":"# ColorPickerPreference\n[![Build Status](https://travis-ci.org/skydoves/ColorPickerPreference.svg?branch=master)](https://travis-ci.org/skydoves/ColorPickerPreference)\n[![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ColorPickerPreference-green.svg?style=flat)](https://android-arsenal.com/details/1/6759)\n[![Android Weekly](https://img.shields.io/badge/Android%20Weekly-%23297-orange.svg)](http://androidweekly.net/issues/issue-297)\n\u003cbr\u003e\nA library that lets you implement ColorPickerView, ColorPickerDialog, ColorPickerPreference. \u003cbr\u003e\nCould get HSV color, RGB values, Html color code from your gallery pictures or custom images just by touching.\n\n![screenshot](https://user-images.githubusercontent.com/24237865/36096666-9e9fc7ca-103a-11e8-9a1a-e1d685d000f9.png)\n![gif](https://user-images.githubusercontent.com/24237865/36096667-9ec6693e-103a-11e8-8ed8-1d99da83c9ac.gif)\n\n## Including in your project\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.skydoves/colorpickerpreference.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.skydoves%22%20AND%20a:%22colorpickerpreference%22)\n[![Jitpack](https://jitpack.io/v/skydoves/ColorPickerPreference.svg)](https://jitpack.io/#skydoves/ColorPickerPreference)\n\n#### Gradle\nAdd below codes to your **root** `build.gradle` file (not your module build.gradle file).\n```gradle\nallprojects {\n    repositories {\n        mavenCentral()\n    }\n}\n```\nAnd add a dependency code to your **module**'s `build.gradle` file.\n```gradle\ndependencies {\n    implementation \"com.github.skydoves:colorpickerpreference:2.0.6\"\n}\n```\n\n## Usage\nAdd following XML namespace inside your XML layout file.\n\n```gradle\nxmlns:app=\"http://schemas.android.com/apk/res-auto\"\n```\n\n\n### ColorPickerView in XML layout\nWe can use `ColorPickerView` without any customized attributes.\u003cbr\u003e\nThis `ColorPickerView` will be initialized with the default HSV color palette and default selector.\n```gradle\n\u003ccom.skydoves.colorpickerview.ColorPickerView\n   android:id=\"@+id/colorPickerView\"\n   android:layout_width=\"300dp\"\n   android:layout_height=\"300dp\" /\u003e\n```\n\n### Attribute descriptions\nWe can customize the palette image and selector or various options using the below attributes.\n```gradle\napp:palette=\"@drawable/palette\" // sets a custom palette image.\napp:selector=\"@drawable/wheel\" // sets a custom selector image.\napp:selector_size=\"32dp\" // sets a width \u0026 height size of the selector.\napp:alpha_selector=\"0.8\" // sets an alpha of thr selector.\napp:alpha_flag=\"0.8\" // sets an alpha of the flag.\napp:actionMode=\"last\" // sets action mode 'always' or 'last'.\napp:preferenceName=\"MyColorPicker\" // sets a preference name.\napp:debounceDuration=\"200\" // sets a debounce duration of the invoking color listener.\n```\n\n### ColorListener\n`ColorListener` is invoked when tapped by a user or selected a position by a function.\n```java\ncolorPickerView.setColorListener(new ColorListener() {\n    @Override\n    public void onColorSelected(int color, boolean fromUser) {\n        LinearLayout linearLayout = findViewById(R.id.linearLayout);\n        linearLayout.setBackgroundColor(color);\n    }\n});\n```\n\n### ColorEnvelope\n`ColorEnvelope` is a wrapper class of color models for providing more variety of color models.\u003cbr\u003e\nWe can get HSV color value, Hex string code, ARGB value from the `ColorEnvelope`.\n```java\ncolorEnvelope.getColor() // returns a integer color.\ncolorEnvelope.getHexCode() // returns a hex code string.\ncolorEnvelope.getArgb() // returns a argb integer array.\n```\n\n### ColorEnvelope Listener\n`ColorEnvelopeListener` extends `ColorListener` and it provides `ColorEnvelope` as a parameter.\n```java\ncolorPickerView.setColorListener(new ColorEnvelopeListener() {\n    @Override\n    public void onColorSelected(ColorEnvelope envelope, boolean fromUser) {\n        linearLayout.setBackgroundColor(envelope.getColor());\n        textView.setText(\"#\" + envelope.getHexCode());\n    }\n});\n```\n\n### Palette\nIf we do not set any customized palette, the default palette drawable is the `ColorHsvPalette`.\u003cbr\u003e\nWe can move and select a point on the palette using a specific color using the below methods.\n```java\ncolorPickerView.selectByHsvColor(color);\ncolorPickerView.selectByHsvColorRes(R.color.colorPrimary);\n```\nWe can change the default palette as a desired image drawable using the below method.\u003cbr\u003e\nBut if we change the palette using another drawable, we can not use the `selectByHsvColor` method.\n```java\ncolorPickerView.setPaletteDrawable(drawable);\n```\nIf we want to change back to the default palette, we can change it using the below method.\n```java\ncolorPickerView.setHsvPaletteDrawable();\n```\n\n### ActionMode\n`ActionMode` is an option restrict to invoke the `ColorListener` by user actions.\n```java\ncolorPickerView.setActionMode(ActionMode.LAST); // ColorListener will be invoked when the finger is released.\n```\n\n### Debounce\nOnly emits color values to the listener if a particular timespan has passed without it emitting using `debounceDuration` attribute.\nWe can set the `debounceDuration` on our xml layout file.\n```xml\napp:debounceDuration=\"150\"  \n```\nOr we can set it programmatically.\n```java\ncolorPickerView.setDebounceDuration(150);\n```\n\n### Create using builder\nThis is how to create `ColorPickerView`'s instance using `ColorPickerView.Builder` class.\n```java\nColorPickerView colorPickerView = new ColorPickerView.Builder(context)\n      .setColorListener(colorListener)\n      .setPreferenceName(\"MyColorPicker\");\n      .setActionMode(ActionMode.LAST)\n      .setAlphaSlideBar(alphaSlideBar)\n      .setBrightnessSlideBar(brightnessSlideBar)\n      .setFlagView(new CustomFlag(context, R.layout.layout_flag))\n      .setPaletteDrawable(ContextCompat.getDrawable(context, R.drawable.palette))\n      .setSelectorDrawable(ContextCompat.getDrawable(context, R.drawable.selector))\n      .build();\n```\n\n### Restore and save\nThis is how to restore the state of `ColorPickerView`.\u003cbr\u003e\n`setPreferenceName()` method restores all of the saved states (selector, color) automatically.\n\n```java\ncolorPickerView.setPreferenceName(\"MyColorPicker\");\n```\n\nThis is how to save the states of `ColorPickerView`.\u003cbr\u003e\n`setLifecycleOwner()` method saves all of the states automatically when the lifecycleOwner is destroy.\n```java\ncolorPickerView.setLifecycleOwner(this);\n```\nOr we can save the states manually using the below method.\n```java\nColorPickerPreferenceManager.getInstance(this).saveColorPickerData(colorPickerView);\n```\n\n### Manipulate and clear\nWe can manipulate and clear the saved states using `ColorPickerPreferenceManager`.\n```java\nColorPickerPreferenceManager manager = ColorPickerPreferenceManager.getInstance(this);\nmanager.setColor(\"MyColorPicker\", Color.RED); // manipulates the saved color data.\nmanager.setSelectorPosition(\"MyColorPicker\", new Point(120, 120)); // manipulates the saved selector's position data.\nmanager.clearSavedAllData(); // clears all of the states.\nmanager.clearSavedColor(\"MyColorPicker\"); // clears only saved color data. \nmanager.restoreColorPickerData(colorPickerView); // restores the saved states manually.\n```\n\n### Palette from Gallery\nHere is how to get a bitmap drawable from the gallery image and set it to the palette.\u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/24237865/52941911-313dc000-33ad-11e9-8264-6d78f4ad613a.jpg\" align=\"left\" width=\"35%\"\u003e\n\nDeclare below permission on your `AndroidManifest.xml` file.\n```gradle\n\u003cuses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/\u003e\n```\nThe below codes will start the Gallery and we can choose the desired image.\n```java\nIntent photoPickerIntent = new Intent(Intent.ACTION_PICK);\nphotoPickerIntent.setType(\"image/*\");\nstartActivityForResult(photoPickerIntent, REQUEST_CODE_GALLERY);\n```\nIn the `onActivityResult`, we can get a bitmap drawable from the gallery and set it as the palette. And We can change the palette image of the `ColorPickerView` using the `setPaletteDrawable` method.\n```java\ntry {\n  final Uri imageUri = data.getData();\n  final InputStream imageStream = getContentResolver().openInputStream(imageUri);\n  final Bitmap selectedImage = BitmapFactory.decodeStream(imageStream);\n  Drawable drawable = new BitmapDrawable(getResources(), selectedImage);\n  colorPickerView.setPaletteDrawable(drawable);\n} catch (FileNotFoundException e) {\n  e.printStackTrace();\n}\n```\n\n### ColorPickerPreference\nColorPickerPreference is used in PreferenceScreen and shows ColorPickerDialog if be clicked.\n```xml\n\u003ccom.skydoves.colorpickerpreference.ColorPickerPreference\n    android:key=\"@string/ToolbarColorPickerPreference\"\n    android:title=\"Toolbar Color\"\n    android:summary=\"changes toolbar color\"\n    app:preference_attachAlphaSlideBar=\"false\" // attach an alpha slide bar or not.\n    app:preference_attachBrightnessSlideBar=\"true\" // attach a brightness slide bar or not.\n    app:preference_colorBox_radius=\"26dp\" // radius of the color box. we can make it circular using this.\n    app:preference_dialog_negative=\"@string/cancel\" // string for closing the dialog.\n    app:preference_dialog_positive=\"@string/confirm\" // string for confirming the dialog.\n    app:preference_dialog_title=\"Toolbar ColorPickerDialog\" // title string to the dialog.\n    app:preference_palette=\"@drawable/palettebar\" // a palette drawable to the ColorPickerView.\n    app:preference_selector=\"@drawable/wheel\" // a selector drawable to the ColorPickerView.\n```\n\n#### customizing\nIf you want to customizing ColorPickerDialog in ColorPickerPreference, you could get ColorPickerDialog.Builder \nusing `getColorPickerDialogBuilder()` method.\n```java\nColorPickerPreference colorPickerPreference_toolbar = (ColorPickerPreference) findPreference(getActivity().getString(R.string.ToolbarColorPickerPreference));\nColorPickerDialog.Builder builder_toolbar = colorPickerPreference_toolbar.getColorPickerDialogBuilder();\nbuilder_toolbar.setFlagView(new CustomFlag(getActivity(), R.layout.layout_flag));\n```\n\n## AlphaSlideBar\nAlphaSlideBar changes the transparency of the selected color. \u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/24237865/90913596-6ea66200-e417-11ea-893a-467e93189c2b.gif\" align=\"left\" width=\"31%\"\u003e\n\n`AlphaSlideBar` in XML layout\n```gradle\n\u003ccom.skydoves.colorpickerview.sliders.AlphaSlideBar\n   android:id=\"@+id/alphaSlideBar\"\n   android:layout_width=\"match_parent\"\n   android:layout_height=\"wrap_content\"\n   app:selector_AlphaSlideBar=\"@drawable/wheel\" // sets a customized selector drawable.\n   app:borderColor_AlphaSlideBar=\"@android:color/darker_gray\" // sets a color of the border.\n   app:borderSize_AlphaSlideBar=\"5\"/\u003e // sets a size of the border.\n```\nWe can attach and connect the `AlphaSlideBar` to our `ColorPickerView` using `attachAlphaSlider` method.\n\n```java\nAlphaSlideBar alphaSlideBar = findViewById(R.id.alphaSlideBar);\ncolorPickerView.attachAlphaSlider(alphaSlideBar);\n```\nWe can make it vertically using the below attributes.\n```gradle\nandroid:layout_width=\"280dp\" // width must set a specific width size.\nandroid:layout_height=\"wrap_content\"\nandroid:rotation=\"90\"\n```\n\n## BrightnessSlideBar\nBrightnessSlideBar changes the brightness of the selected color. \u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/24237865/90913583-6c440800-e417-11ea-8645-c5f6d1bf97df.gif\" align=\"left\" width=\"31%\"\u003e\n\n`BrightnessSlideBar` in XML layout\n```gradle\n\u003ccom.skydoves.colorpickerview.sliders.BrightnessSlideBar\n   android:id=\"@+id/brightnessSlide\"\n   android:layout_width=\"match_parent\"\n   android:layout_height=\"wrap_content\"\n   app:selector_BrightnessSlider=\"@drawable/wheel\" // sets a customized selector drawable.\n   app:borderColor_BrightnessSlider=\"@android:color/darker_gray\" // sets a color of the border.\n   app:borderSize_BrightnessSlider=\"5\"/\u003e // sets a size of the border.\n```\nWe can attach and connect the `BrightnessSlideBar` to our `ColorPickerView` using `attachBrightnessSlider` method.\n\n```java\nBrightnessSlideBar brightnessSlideBar = findViewById(R.id.brightnessSlide);\ncolorPickerView.attachBrightnessSlider(brightnessSlideBar);\n```\nWe can make it vertically using the below attributes.\n```gradle\nandroid:layout_width=\"280dp\" // width must set a specific width size.\nandroid:layout_height=\"wrap_content\"\nandroid:rotation=\"90\"\n```\n\n## ColorPickerDialog\n![dialog0](https://user-images.githubusercontent.com/24237865/45362890-0d619b80-b611-11e8-857b-e12f82978b53.jpg) \n![dialog1](https://user-images.githubusercontent.com/24237865/45362892-0d619b80-b611-11e8-9cc5-25518a9d392a.jpg) \u003cbr\u003e\n\n`ColorPickerDialog` can be used just like an AlertDialog and it provides colors by tapping from any drawable. \u003cbr\u003e\n\n```java\nnew ColorPickerDialog.Builder(this)\n      .setTitle(\"ColorPicker Dialog\")\n      .setPreferenceName(\"MyColorPickerDialog\")\n      .setPositiveButton(getString(R.string.confirm),\n          new ColorEnvelopeListener() {\n              @Override\n              public void onColorSelected(ColorEnvelope envelope, boolean fromUser) {\n                  setLayoutColor(envelope);\n              }\n          })\n       .setNegativeButton(getString(R.string.cancel),\n          new DialogInterface.OnClickListener() {\n              @Override\n              public void onClick(DialogInterface dialogInterface, int i) {\n                  dialogInterface.dismiss();\n              }\n           })\n      .attachAlphaSlideBar(true) // the default value is true.\n      .attachBrightnessSlideBar(true)  // the default value is true.\n      .setBottomSpace(12) // set a bottom space between the last slidebar and buttons.\n      .show();\n```\n\nwe can get an instance of `ColorPickerView` from the `ColorPickerView.Builder` and we can customize it. \u003cbr\u003e\n```java\nColorPickerView colorPickerView = builder.getColorPickerView();\ncolorPickerView.setFlagView(new CustomFlag(this, R.layout.layout_flag)); // sets a custom flagView\nbuilder.show(); // shows the dialog\n```\n\n## FlagView\nWe can implement showing a `FlagView` above and below on the selector.\u003cbr\u003e\nThis library provides `BubbleFlagView` by default as we can see the [previews](https://github.com/skydoves/ColorPickerView#colorpickerview).\u003cbr\u003e\nHere is the example code for implementing it.\n\n```java\nBubbleFlag bubbleFlag = new BubbleFlag(this);\nbubbleFlag.setFlagMode(FlagMode.FADE);\ncolorPickerView.setFlagView(bubbleFlag);\n```\n\nWe can also fully customize the `FlagView` like below.\u003cbr\u003e\n![flag0](https://user-images.githubusercontent.com/24237865/45364191-75fe4780-b614-11e8-81a5-04690a4392db.jpg) \n![flag1](https://user-images.githubusercontent.com/24237865/45364194-75fe4780-b614-11e8-844c-136d14c91560.jpg) \u003cbr\u003e\n\nFirst, We need a customized layout like below.\n```gradle\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cLinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"100dp\"\n    android:layout_height=\"40dp\"\n    android:background=\"@drawable/flag\"\n    android:orientation=\"horizontal\"\u003e\n\n    \u003cLinearLayout\n        android:id=\"@+id/flag_color_layout\"\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:layout_marginTop=\"6dp\"\n        android:layout_marginLeft=\"5dp\"\n        android:orientation=\"vertical\"/\u003e\n\n    \u003cTextView\n        android:id=\"@+id/flag_color_code\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"6dp\"\n        android:layout_marginLeft=\"10dp\"\n        android:layout_marginRight=\"5dp\"\n        android:textSize=\"14dp\"\n        android:textColor=\"@android:color/white\"\n        android:maxLines=\"1\"\n        android:ellipsize=\"end\"\n        android:textAppearance=\"?android:attr/textAppearanceSmall\"\n        tools:text=\"#ffffff\"/\u003e\n\u003c/LinearLayout\u003e\n```\n\nSecond, we need to create a class that extends `FlagView`. Here is an example code.\n```java\npublic class CustomFlag extends FlagView {\n\n    private TextView textView;\n    private AlphaTileView alphaTileView;\n\n    public CustomFlag(Context context, int layout) {\n        super(context, layout);\n        textView = findViewById(R.id.flag_color_code);\n        alphaTileView = findViewById(R.id.flag_color_layout);\n    }\n\n    @Override\n    public void onRefresh(ColorEnvelope colorEnvelope) {\n        textView.setText(\"#\" + colorEnvelope.getHexCode());\n        alphaTileView.setPaintColor(colorEnvelope.getColor());\n    }\n}\n```\n\nAnd last, set the `FlagView` to the `ColorPickerView` using the `setFlagView` method.\n\n```java\ncolorPickerView.setFlagView(new CustomFlag(this, R.layout.layout_flag));\n```\n\n### FlagMode\n`FlagMode` is an option to decides the visibility action of the `FlagView`.\n```java\ncolorPickerView.setFlagMode(FlagMode.ALWAYS); // showing always by tapping and dragging.\ncolorPickerView.setFlagMode(FlagMode.LAST); // showing only when finger released.\n```\n\n## AlphaTileView\n![alphatileview](https://user-images.githubusercontent.com/24237865/45364416-09377d00-b615-11e8-9707-b83f55053480.jpg) \u003cbr\u003e\n`AlphaTileView` visualizes ARGB colors over the view.\u003cbr\u003e\nIf we need to represent ARGB colors on the general view, it will not be showing accurately. Because a color will be mixed with the parent view's background color. so if we need to represent ARGB colors accurately, we can use the `AlphaTileView`.\n\n```gradle\n\u003ccom.skydoves.colorpickerview.AlphaTileView\n     android:id=\"@+id/alphaTileView\"\n     android:layout_width=\"55dp\"\n     android:layout_height=\"55dp\"\n     app:tileSize=\"20\" // the size of the repeating tile\n     app:tileEvenColor=\"@color/tile_even\" // the color of even tiles\n     app:tileOddColor=\"@color/tile_odd\"/\u003e // the color of odd tiles\n```\n\n### ColorPickerView Methods\nMethods | Return | Description\n--- | --- | ---\ngetColor() | int | gets the last selected color.\ngetColorEnvelope() | ColorEnvelope | gets the `ColorEnvelope` of the last selected color.\nsetPaletteDrawable(Drawable drawable) | void | changes palette drawable manually.\nsetSelectorDrawable(Drawable drawable) | void | changes selector drawable manually.\nsetSelectorPoint(int x, int y) | void | selects the specific coordinate of the palette manually.\nselectByHsvColor(@ColorInt int color) | void | changes selector's selected point by a specific color.\nselectByHsvColorRes(@ColorRes int resource) | void | changes selector's selected point by a specific color using a color resource.\nsetHsvPaletteDrawable() | void | changes the palette drawable as the default drawable (ColorHsvPalette).\nselectCenter() | void | selects the center of the palette manually.\nsetActionMode(ActionMode) | void | sets the color listener's trigger action mode.\nsetFlagView(FlagView flagView) | void | sets `FlagView` on `ColorPickerView`.\nattachAlphaSlider | void | linking an `AlphaSlideBar` on the `ColorPickerView`.\nattachBrightnessSlider | void | linking an `BrightnessSlideBar` on the `ColorPickerView`.\n\n#### ColorPickerPreference\nMethods | Return | Description\n--- | --- | ---\nsetColorPickerDialogBuilder(ColorPickerDialog.Builder builder) | void | sets ColorPickerDialog.Builder as your own build\ngetColorPickerDialogBuilder() | ColorPickerDialog.Builder | returns ColorPickerDialog.Builder\n\n## Posting \u0026 Blog\n- [Android Weekly #297](http://androidweekly.net/issues/issue-297)\n- [25 new Android libraries, projects and tools worthy to check in Spring 2018](https://medium.com/@mmbialas/25-new-android-libraries-projects-and-tools-worthy-to-check-in-spring-2018-68e3c5e93568)\n- [Colour Wheel – Part 1](https://blog.stylingandroid.com/colour-wheel-part-1)\n- [Using ColorPickerPreference library in Android Studio - Youtube](https://www.youtube.com/watch?v=_q7a0EPbGvU)\n\n## Find this library useful? :heart:\nSupport it by joining [stargazers](https://github.com/skydoves/ColorPickerPreference/stargazers) for this repository. :star:\n\n## Supports :coffee:\nIf you feel like support me a coffee for my efforts, I would greatly appreciate it. \u003cbr\u003e\u003cbr\u003e\n\u003ca href=\"https://www.buymeacoffee.com/skydoves\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/purple_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" \u003e\u003c/a\u003e\n\n# License\n```xml\nCopyright 2018 skydoves\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":["https://github.com/sponsors/skydoves","https://www.paypal.me/skydoves","https://www.buymeacoffee.com/skydoves"],"categories":["Kotlin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskydoves%2FColorPickerPreference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskydoves%2FColorPickerPreference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskydoves%2FColorPickerPreference/lists"}