Color Picker
BsColorPicker is a component that allow users to select a color using a variety of input methods.
Usage
Swatches
Use the swatches property to display an array of color swatches that users can pick from.
Popup Dialog
<bs-color-picker> can be displayed as a popup dialog and use BsPopover internally.
CSS Variables
As CSS technology evolves, Vue MDBootstrap introduces local CSS variables on .md-color-picker for better customization.
scss
.md-color-picker {
--md-color-picker-bg: var(--background-tertiary);
--md-color-picker-border-radius: var(--md-radius);
--md-color-picker-input-bg: #{colors.$gray-100};
--md-color-picker-input-border: 1px solid oklch(0.867 0.011 247.949);
--md-color-picker-input-color: inherit;
--md-color-picker-input-focus-bg: var(--background-secondary, #{colors.$white});
--md-color-picker-input-focus-color: inherit;
--md-color-picker-input-focus-outline: 2px solid var(--md-field-active-indicator);
--md-color-picker-input-focus-shadow: oklch(0.578 0.228 260.025 / 0.25);
--md-color-picker-slider-thumb-color: #{color.scale(colors.$neutral-base, $lightness: -40%)};
}