MtColorpicker component provides an interactive color picker with multiple color format outputs and alpha channel support.
Import
Props
The value of the colorpicker field (hex, rgb, or hsl).
A label for your colorpicker field.
Change the output value format. ‘auto’ outputs hex for opaque colors and rgba for transparent.
If activated, the color value can contain alpha values.
Determines if the field is disabled.
Determines if the field is required.
Determines if the field can be edited.
Toggle the labels above each field inside the colorpicker.
Show the colorpicker in a compact mode.
Use apply-mode to apply the color value on button click.
Placeholder text to show when no color is selected.
A text that helps the user understand what this field does.
An error in your business logic related to this field.
Z-index for the colorpicker dropdown.
Toggles the inheritance visualization.
Determines if the field is inheritable.
Determines the active state of the inheritance toggle.
Events
Emitted when the selected color value changes.
Emitted when inheritance is restored.
Emitted when inheritance is removed.
Usage
Basic Colorpicker
With Alpha Channel
Different Output Formats
Compact Mode
Apply Mode
Accessibility
- Color picker uses ARIA labels for all interactive elements
- Keyboard navigation supported (arrow keys for hue/saturation/lightness)
- Focus trap when colorpicker is open
- Escape key closes the colorpicker
- Color input validates format automatically
- Screen reader friendly with proper ARIA attributes