Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Select
Custom Inputs
Components
Navigation
Components
69
Micro Charts
Libraries
Kanban Board
Image Designer
Video Player
Visual Builder
Content Editor
Data View
Latest npm version of @ngstarter-ui/componentsWeekly npm downloads of @ngstarter-ui/components
Purchase

Color Switcher

Color Switcher lets users choose one color from a fixed allowed palette. Use it for brand color presets, accent color presets, project colors, category colors, tag colors, tenant branding, and theme playground controls.

Use it for:
  • Selecting one color from a predefined list of allowed colors.
  • Binding the selected color with selectedColor and colorChange.
  • Using the component as an Angular form control with ngModel.
  • Disabling the color choice when the palette should be visible but not editable.

Do not use Color Switcher for arbitrary custom colors; use Color Picker for that. Do not use it for light, dark, or auto theme mode; use Color Scheme for that. Do not replace it with Segmented or custom buttons when the task is choosing from a fixed color set.

PropTypeDefault
@Input() colors: string[]
The list of colors to display in the switcher.
string[]defaultColors
@Input() selectedColor: string
The currently selected color.
string-
@Input() disabled: boolean
Whether the color switcher is disabled.
booleanfalse
EventDescription
@Output() colorChange: EventEmitter<string>
Event emitted when a color is selected.