Ask AI
Skip to main content

Get value of color field

Function: Get value of color field

This action helps you retrieve the color value currently selected in a specific "Color Input Field" on your application's screen. Once retrieved, this color value is stored in a variable, and the action will provide you with the name of that variable for you to use in subsequent steps.

Input

  • UI element (Part): This is the specific "Color Input Field" on your page from which you want to get the selected color. You need to choose the correct UI element that is designed to capture color inputs.

Output

  • Answer (Text): This action will store the color value retrieved from the UI element (e.g., "#FF0000" for red) into a variable. This Answer field allows you to specify the name of that variable. For instance, if you enter myChosenColor, the color value will be stored in a variable named myChosenColor. If left blank, it defaults to INPUT_FIELD_ANSWER. This variable name is then made available for you to reference in later steps of your application.

Execution Flow

Real-Life Examples

Here are some practical examples of how you can use the "Get value of color field" action:

  1. Dynamically change a page's theme color:

    • Inputs:
      • UI element: ThemeColorPicker (a Color Input Field on your settings page)
      • Answer: chosenThemeColor
    • Result: The color value selected by the user in the ThemeColorPicker (e.g., "#007bff" for blue) is stored in a variable named chosenThemeColor. You can then use this chosenThemeColor variable to update the background color of a section or the primary color of your application's theme.
  2. Save a product's color selection to a database:

    • Inputs:
      • UI element: ProductColorSelector (a Color Input Field on a product editing form)
      • Answer: selectedProductColor
    • Result: The color value chosen by the user for a product (e.g., "#FFD700" for gold) is stored in a variable named selectedProductColor. This selectedProductColor variable can then be used in a subsequent action to update the color field of a Product record in your database.
  3. Display a user's preferred accent color:

    • Inputs:
      • UI element: UserAccentColor (a Color Input Field in a user profile settings)
      • Answer: userAccentColor
    • Result: The color value selected by the user in the UserAccentColor field (e.g., "#8A2BE2" for blue-violet) is stored in a variable named userAccentColor. This userAccentColor variable can then be used to set the text color of a "Welcome" message or highlight specific elements on the user's dashboard, personalizing their experience.