Blog

Color Picker Component

by on October 19, 2022

Color Picker UI Component

Adding a color picker to your app allows your users to visually select the color they want without having to know the precise HEX, RGB or HSL code for the color.

The Color Picker component lets you add a color picker to your UI in a snap. With the Color Picker, your users to select the color they want, whether it’s used to personalize their own UI, add tinting to an image, customize the font color in an email – whatever the need may be.

The Color Picker component, available free in Backendless Marketplace, allows users to choose any color from the color wheel, providing the HEX, RGB and HSL codes.

Color Picker component example

It also allows the user to adjust the opacity (alpha channel) of the color for even greater precision.

Read the full documentation here.

How to Install the Color Picker Component

Installing custom components from Backendless Marketplace is super easy. First, in UI Builder, select the Components tab.

Go to Components in UI Builder

There, you will see a button labeled Install Component. This will take you to the library of components available in the Marketplace.

Install UI Component in UI Builder

When you click Install Component, you will open a list of available UI Components to install.

Install UI Component in UI Builder

Select the component you want and click Install.

When you return to the User Interface tab, you will see a new section added to your toolkit on the right-hand side called Custom Components.

Color Picker Component added to UI Builder Canvas

You can then simply drag the component onto your canvas just like any other UI Component.

How the Color Picker Component Works

When added to your app, the Color Picker component offers several basic functions out of the box.

First, you have four options for the appearance of the picker itself. You can choose between a circular or square color wheel, and you can choose between vertical and horizontal display of the picker box.

Color Picker display options

You also have the option to include or exclude the opacity slider, RGB format, and HSL format. If you need your users to choose their color in a specific format, you can easily control the format the is shown.

Available Options and What They Mean

Once you have placed your component, when you select it, you will see all of the available options (properties) for the component in the toolkit area. These are the default settings for the component that you can easily adjust.

Each of the available properties are described in the table below. For more information, such as Theme styles and event handlers, visit the Color Picker GitHub repo.

Property Type Default value Logic Data Binding UI Setting Description
Picker Trigger Visibility Checkbox true NO YES enables toggling visibility of the color picker by a button
Circle Color Picker Checkbox false NO YES enables wheel layout for the color picker
Vertical Color Picker Checkbox false NO YES enables vertical direction of the color picker ui components
Opacity Slider Visibility Checkbox true NO YES enables opacity slider in the color picker
Opacity Input Visibility Checkbox true NO YES enables opacity input in the color picker
RGB Format Visibility Checkbox true NO YES enables RGB color format in the color picker
HSL Format Visibility Checkbox true NO YES enables HSL color format in the color picker
Selected Color Color “#ff0000” Selected Color Logic YES YES controls selected color in the color picker

 

When you click on the Logic icon or tab for the component, you will see the modifiable event handlers, just as you would with a standard component. However, the main logic for the component – the logic that makes it work – is hidden to protect it from accidentally being broken.

Additionally, in the Logic area, you will also find all available data binding properties.

That’s it! Ready to try it for yourself?

The Color Picker component is one of many custom components available now in Backendless Marketplace, completely free!

Start Building Your Perfect UI

Start for free today to get access to the full library of UI components, plus the most powerful Codeless backend available. What are you waiting for?

Leave a Reply