aw codes icon logo
Docs Hub

Search across every project.

Palette Switch project

A color picker field for Filament Forms that uses preset color palettes.

3.x Current

On this page

Palette

Palette gives Filament forms a color picker restricted to a palette you define. Instead of a free-form picker that can produce any value, the user chooses from a fixed set of swatches — your brand colors, your theme's registered colors, or whatever list you pass in.

It is for content that has to stay on-brand. When an editor picks a heading color or a section background, you usually want them choosing from the design system rather than typing a hex value.

What's included

Palette ships three components:

  • ColorPicker — a row of clickable color swatches, for forms.
  • ColorPickerSelect — the same palette as a searchable dropdown with a swatch beside each option, for forms where a row of swatches would be too wide.
  • ColorEntry — renders a stored color as a swatch, for infolists.

All three read the same color definitions and understand the same stored format.

Where to go next

  • Installation — install the package and register its views with your theme.
  • Components — the fields and entry, and the color options they share.
  • Storing colors — how the selected color is saved, and how to store just the key instead.
  • Styling — the CSS classes available for customization.