Components

Saturation

A 2D saturation and brightness picker with intuitive color selection

Features

  • 2D Selection: Horizontal saturation, vertical brightness control
  • Visual Gradients: Real-time color preview with smooth transitions
  • Precise Control: Exact percentage values for saturation and brightness
  • Interactive Pointer: Clear visual indicator of current selection

Basic Usage

Saturation Selector

Current Saturation: 58%
Current Brightness: 100%
Color: #ff6b9c
import { ColorPicker, useColorState } from 'react-beautiful-color';

export function SaturationExample() {
const [{ colorInput, colorState }, setColor] = useColorState({ type: 'hex', value: '#ff6b9d' });

return (
<div className="p-6">
  <div className="max-w-md">
    <h4 className="mb-3 text-sm font-medium">Saturation Selector</h4>
    <ColorPicker
      color={colorInput}
      onChange={setColor}
      className="mb-4 max-h-40"
    >
      <ColorPicker.Saturation className="max-h-40" />
    </ColorPicker>
    <div className="space-y-1 text-sm">
      <div>
        <div>Current Saturation: {Math.round(colorState.hsv.s)}%</div>
        <div>Current Brightness: {Math.round(colorState.hsv.v)}%</div>
        <div>
          Color: <span className="font-mono">{colorState.hex}</span>
        </div>
      </div>
    </div>
  </div>
</div>
);
}

Props

PropTypeDefaultDescription
classNamestring-Additional CSS classes