The following options can be passed to Coloris() to customize the picker's appearance and behavior.
Coloris({
// CSS selector or HTMLElement for the picker's container.
// Container must have CSS position 'relative' or 'absolute'.
parent: '.container',
// Custom selector to bind the picker to (HTML input fields, HTMLElement, or array).
el: '.color-field',
// Wrap input fields in a div with a thumbnail and accessible button (default: true).
// Only works with custom 'el' selector, not with [data-coloris].
wrap: true,
// Enable basic right-to-left support.
rtl: false,
// Available themes: 'default', 'large', 'polaroid', 'pill' (horizontal).
theme: 'default',
// Theme mode: 'light' (default), 'dark', or 'auto' (follows system preference).
themeMode: 'light',
// Margin in pixels between input fields and the dialog.
margin: 2,
// Preferred color string format: 'hex' (default), 'rgb', 'hsl', 'auto', or 'mixed'.
format: 'hex',
// Enable format toggle buttons in the dialog (forces format to 'auto').
formatToggle: false,
// Enable/disable alpha (opacity) support.
alpha: true,
// Always include alpha value even if opacity is 100%.
forceAlpha: false,
// Hide all widgets except swatches.
swatchesOnly: false,
// Focus the color value input when opened.
focusInput: true,
// Select and focus the color value input when opened.
selectInput: false,
// Show an optional clear button.
clearButton: false,
// Label for the clear button.
clearLabel: 'Clear',
// Show an optional close button.
closeButton: false,
// Label for the close button.
closeLabel: 'Close',
// Array of color swatches to display. If empty, swatches are disabled.
swatches: ['#264653', '#2a9d8f'],
// Use as an inline widget (always visible, positioned statically).
inline: false,
// Default color for inline mode.
defaultColor: '#000000',
// Callback function called when a new color is picked.
// Arguments: (color, input)
onChange: (color, input) => undefined
});