--- import site from '@data/site.json' import CaptureScript from '../components/CaptureScript.astro' interface Props { value?: string id: string /** Coloris output format; false leaves the library default */ format?: 'hex' | 'rgb' | 'hsl' | 'auto' | 'mixed' | false class?: string /** Accessible name for the input; falls back to a generic label when the caller doesn't wrap this in a labelled FormGroup */ ariaLabel?: string } const { value, id, format = false, class: className, ariaLabel } = Astro.props const alpha = false // Coloris parses hex, rgb and hsl only, and the CSS tokens are `oklch()`, so the // swatches use the hex values from site.json. const colors = site.colors as Record const swatches = Object.values(colors).map((color) => color.hex) const colorpickerId = `colorpicker-${id}` const colorpickerSelector = `#colorpicker-${id}` ---