diff --git a/preview/pages/colorpicker.astro b/preview/pages/colorpicker.astro index 638e2a179..d4632d08e 100644 --- a/preview/pages/colorpicker.astro +++ b/preview/pages/colorpicker.astro @@ -17,6 +17,13 @@ const formats = [ { format: 'hsl', value: 'hsl(291 54% 53%)' }, { format: 'oklch', value: 'oklch(64% 0.22 27)' }, ] as const + +const alphaFormats = [ + { format: 'hex', value: '#ae3ec980' }, + { format: 'rgb', value: 'rgb(214 51 108 / 0.6)' }, + { format: 'hsl', value: 'hsl(209 94% 42% / 0.4)' }, + { format: 'oklch', value: 'oklch(64% 0.22 27 / 0.75)' }, +] as const --- @@ -61,10 +68,7 @@ const formats = [ Options - Opacity, a fixed set of swatches, and the extra controls in the panel. - - - + A fixed set of swatches, the extra controls in the panel, and an empty field. @@ -77,6 +81,23 @@ const formats = [ +
+ + + Alpha channel + + data-bs-alpha="true" adds the opacity slider and keeps the alpha in the value: eight hex digits, or a / alpha part in the other notations. + + { + alphaFormats.map(({ format, value }) => ( + + + + )) + } + + +