Tutorials

/

Color Picker Element: How Do You Use It?

By following these steps, you can create an interface where users can use Color Picker elements to select the background and text colors of a panel separately and see the changes instantly.

‍

‍

The “Color Picker” element is a visual input element that allows users to easily and quickly select a color from a color palette. Users can specify the color value they want by choosing from the available color options. It is used in scenarios that require visual decisions, such as color-based preferences.
To use this element, first drag the “Horizontal Stack” element onto your page. Then, place a “Label” element inside it and enter “Background Color” in the “Value” field. Next, drag the “Color Picker” element next to it. Use “Duplicate” to create an identical structure and make any necessary text changes. Add a “Panel” at the bottom, and adjust its width and height in the “Layout” section of the “Styling” panel. Click the “Color Picker” element and define it by following the steps: “onChange,” “UI Control,” and “Set Value Of.” Select “Panel1” for “Component to Change.” For the “Value” field, follow the steps: “Components,” “ColorPicker1,” “value.” Repeat the same steps for the “Color Picker” element below and define it as “ColorPicker2.” Add a “Vertical Stack” element inside the “Panel” and center it using the “Align” field in the “Styling” panel. Inside it, add two “Label” elements and center them using the “Styling” panel. Add your text to the “Label” elements via the “Value” field in the “Properties” panel. Click on the “Panel” element, and in the “Properties” panel on the right, set the “DynamicBackgroundColor” field to “Components,” “ColorPicker1,” “value”; and set the “DynamicFontColor” field to “Components,” “ColorPicker2,” “value.”
When the application is tested, the user uses the Color Picker elements to customize the appearance of the panel in the user interface. Using the Background Color and Text Color selection fields at the top of the screen, the user can set the panel’s background color and the color of the text within the panel separately.