Skip to main content

Color Palette

UI Design

What is a Color Palette

A color palette is the set of colors a product uses. In UI design, a palette is more than a few swatches. Each color has a role, such as primary action, background, text or error.

What a UI Color Palette includes

  • Primary color: The main brand and action color
  • Accent colors: Secondary colors for emphasis
  • Neutrals: Grays for text, borders and surfaces
  • Status colors: Success, warning and error

How to build a Color Palette

Start from the brand color, then add neutrals and status colors. Give each color a semantic name, such as "surface" or "on-primary", and store it as a design token. Material Design 3 builds full schemes from three accent groups, each with several color roles.

Color Palettes and themes

A role-based palette makes dark mode easier. The role stays the same and only its value changes per theme. Check text contrast in every theme, with at least 4.5:1 for normal text.

Frequently asked questions

What colors does a UI color palette need?

Most UI palettes have a primary brand color, one or two accent colors, a range of neutrals for text and surfaces, and status colors for success, warning and error. Each color gets a clear role.

How many colors should a UI palette have?

There is no fixed number. Material Design 3, for example, uses three accent groups (primary, secondary and tertiary), each with several roles, plus neutral surface colors.

How does a color palette work in dark mode?

The roles stay the same, but each role gets a different value. A semantic color such as "surface" is light in light mode and dark in dark mode, so components keep working in both.