Styling

Every option on this page is off by default, so upgrading keeps the original look. Try the combinations below:

Shape
Style
<BlossomColorPicker petalShape='sakura' petalStyle='veined' />

Petal Shapes

petalShape sets the outline of every petal:

ValueLook
'circle'Round petals, the original look (default).
'sakura'Broad petals with a small notch at the tip.
'lotus'A round base drawn up into a pointed tip.
'pinwheel'The tip sweeps to one side, so the bloom looks like it is turning.

Shaped petals point their tip away from the core, are shaded lightly from base to tip, and only respond to the pointer inside their outline.

Petal Styles

petalStyle adds surface detail to shaped petals:

ValueLook
'flat'Plain petals (default).
'veined'A midrib and two pairs of side veins on each petal.

petalStyle has no effect when petalShape is 'circle'.

<BlossomColorPicker petalShape='sakura' petalStyle='veined' />

Hover Preview

Set hoverPreview to show the hovered or keyboard-focused petal's color on the ring, the background and (with showCoreColor) the core before it is picked. onHover receives that color, and null when the preview ends:

<BlossomColorPicker
  hoverPreview
  showCoreColor
  onHover={color => setPreview(color?.hex ?? null)}
/>

CSS Variables

Set these on .bcp-root or any ancestor. Each one falls back to the default look, so leaving them unset changes nothing.

VariableDefaultStyles
--bcp-surface#FFFFFFBackground disc behind the petals.
--bcp-surface-shadowsoft drop shadowShadow of the background disc.
--bcp-tint-opacity0.15Strength of the selected-color tint on the disc.
--bcp-trackrgba(0, 0, 0, 0.06)Unfilled track of the ring and the shade slider.
--bcp-petal-shadownoneShadow under each round petal.
--bcp-petal-shadow-hover--bcp-petal-shadowShadow under a hovered round petal.
--bcp-petal-hover-scale1.1How much a hovered petal grows.
--bcp-petal-hover-brightness1.1How much a hovered petal brightens.
--bcp-petal-vein-color#fffColor of the vein lines with petalStyle: 'veined'.
--bcp-petal-vein-opacity0.5Opacity of the vein lines.
--bcp-core-bg#FFFFFFCore color while expanded, when showCoreColor is off.
--bcp-core-shadowsubtle ring + shadowShadow of the expanded core.
--bcp-trigger-shadow0 2px 8px rgba(0, 0, 0, 0.12)Shadow of the collapsed trigger.
--bcp-trigger-shadow-hover0 4px 14px rgba(0, 0, 0, 0.18)Shadow of the hovered trigger.
--bcp-handle-borderwhiteOutline of the shade slider handle.
--bcp-focus-ring#3b82f6Keyboard focus outline.
--bcp-focus-ring-gapwhiteGap between the core and its focus outline.

For example, a dark theme:

.dark .bcp-root {
  --bcp-surface: #1e1b2e;
  --bcp-core-bg: #1e1b2e;
  --bcp-track: rgba(255, 255, 255, 0.12);
  --bcp-handle-border: #1e1b2e;
  --bcp-focus-ring-gap: #1e1b2e;
  --bcp-petal-vein-opacity: 0.35;
}

On this page