Chrome Picker

The ChromePicker is a professional-grade color picker built for more conventional color selection workflows. It features a compact, practical layout with full support for HEX, RGBA, and HSLA color formats, making it ideal for design tools, settings panels, and admin interfaces.

Features

  • Multi-Format Support: Easily switch between HEX, RGBA, and HSLA formats.
  • Integrated Core: Powered by the Blossom Color Picker core for smooth color selection.
  • Alpha Support: Built-in alpha transparency slider for precise control.
  • Multi-Framework: Native wrappers for React, Vue, Svelte, and Angular.

Vanilla JavaScript

ChromePicker is exported from the core package too:

npm install @dayflow/blossom-color-picker
pnpm add @dayflow/blossom-color-picker
yarn add @dayflow/blossom-color-picker
bun add @dayflow/blossom-color-picker
import { ChromePicker } from '@dayflow/blossom-color-picker';
import '@dayflow/blossom-color-picker/styles.css';

const picker = new ChromePicker(document.getElementById('picker'), {
  onChange: color => console.log(color.hex),
});

Usage

Select your framework to see how to integrate ChromePicker into your application.

import { useState } from 'react';
import { ChromePicker } from '@dayflow/blossom-color-picker-react';

function App() {
  const [color, setColor] = useState({
    hue: 330,
    saturation: 70,
    alpha: 100,
    layer: 'outer' as const,
  });

  return (
    <ChromePicker
      value={color}
      onChange={setColor}
    />
  );
}
<template>
  <ChromePicker
    :value="color"
    @change="handleChange"
  />
</template>

<script setup>
import { ref } from 'vue';
import { ChromePicker } from '@dayflow/blossom-color-picker-vue';

const color = ref({
  hue: 330,
  saturation: 70,
  alpha: 100,
  layer: 'outer',
});

function handleChange(nextColor) {
  color.value = nextColor;
}
</script>
import { Component } from '@angular/core';
import {
  ChromePickerComponent,
  type BlossomColorPickerColor,
} from '@dayflow/blossom-color-picker-angular';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [ChromePickerComponent],
  template: `
    <chrome-picker
      [value]="color"
      (colorChange)="onColorChange($event)"
    />
  `
})
export class AppComponent {
  color = {
    hue: 330,
    saturation: 70,
    alpha: 100,
    layer: 'outer' as const,
  };

  onColorChange(nextColor: BlossomColorPickerColor) {
    this.color = nextColor;
  }
}
<script>
import { ChromePicker } from '@dayflow/blossom-color-picker-svelte';

let color = {
  hue: 330,
  saturation: 70,
  alpha: 100,
  layer: 'outer',
};

function handleChange(nextColor) {
  color = nextColor;
}
</script>

<ChromePicker
  value={color}
  onchange={handleChange}
/>

Configuration Options

The ChromePicker shares most of the same configuration options as the standard BlossomColorPicker.

OptionTypeDefaultDescription
valueBlossomColorPickerValue-Controlled value for the picker.
defaultValueBlossomColorPickerValue{ hue: 330, saturation: 70, alpha: 50, layer: 'outer' }Initial value used when the picker is uncontrolled.
colorsColorInput[]DEFAULT_COLORSArray of colors displayed as petals in the blossom section.
onChange(color: BlossomColorPickerColor) => void-Called whenever the selected color changes.
onCollapse(color: BlossomColorPickerColor) => void-Called when the picker collapses.
disabledbooleanfalseDisables user interaction.
showAlphaSliderbooleantrueShows the alpha slider row.
coreSizenumber32Size of the blossom core button in pixels.
petalSizenumber32Size of the blossom petals in pixels.
collapsiblebooleanfalseWhether the blossom section can collapse. ChromePicker defaults to false.

For the full shared option set, please refer to the Options page.

On this page