Intro

You can use the color palette to let users choose a color from a predefined set of colors. The colors are fixed and do not change with the theme.

Color palette

Color palette

Usage

Use the color palette if:

Do not use the color palette if:

Responsiveness

The color palette supports cozy and compact content densities.

Size S

Size S

Size M

Size M

Size L

Size L

Components

  • A link to select the default color (optional).
  • The color palette, consisting of 2 to 15 color buttons.
  • A link that opens a color picker in a dialog (optional).
  • Recent colors (optional). Users can see the last 5 colors they have recently picked. This function helps users to select colors that they have already chosen from the color picker. By default, this feature is visible.

Color palette with all optional features

Color palette with all optional features

Color palette with 15 colors and just one recent color

Color palette with 15 colors and just one recent color

Behavior and Interaction

Users can select a color with the left mouse button, the tap gesture, or by pressing SPACE or ENTER on a keyboard. The selected color is not indicated in the control itself.

With the liveChange event, the color change can have an immediate effect and allows app developers to be aware of real-time color changes before they close the popover that contains it.

Hovering over a color provides a visual feedback.

To navigate between different colors on a keyboard, use the arrow keys.

Visual feedback on hover

Visual feedback on hover

Guidelines

Resources

Elements and Controls

Implementation

Visual Design

Elements and Controls

Implementation