modules/colour_picker/colour_picker library

The Collect Colour Picker — a family of interactive colour selection widgets.

This library provides four distinct picker styles, each suited to different use cases and visual preferences:

Picker Best For
wheel Intuitive hue/saturation selection
square Precise colour space exploration (HSV/HSL/RGB)
ring Compact hue selection with SV palette
slides Channel-by-channel slider control

All pickers are accessed through the static factory methods on ColourPicker. They share common features like alpha support, colour history, label display, and thumb colour previews.

ColourPicker.wheel(
  currentColour: myColour,
  onColourChanged: (colour) => setState(() => myColour = colour),
)

Classes

BaseColourPicker<T extends StatefulWidget>
Base class for all colour picker implementations.
CheckerPainter
Paints a checkerboard pattern, commonly used as a transparency background.
ColorIndicator
A circular swatch that previews the current colour.
ColourLabel
A dropdown-driven colour value display that lets the user switch between output formats on the fly.
ColourPicker
Central factory for creating colour picker widgets.
ColourPickerGestureUtils
Shared geometry and coordinate utilities for colour picker gesture handling.
ColourPickerSlider
A single-axis colour slider for one channel of a colour model.
HSLWithHueColorPainter
Paints an HSL palette where hue is the free variable.
HSLWithLightnessColorPainter
Paints an HSL palette where lightness is the free variable.
HSLWithSaturationColorPainter
Paints an HSL palette where saturation is the free variable.
HSVWithHueColorPainter
Paints an HSV palette where hue is the free variable (controlled by an external slider).
HSVWithSaturationColorPainter
Paints an HSV palette where saturation is the free variable.
HSVWithValueColorPainter
Paints an HSV palette where value (brightness) is the free variable.
HUEColorWheelPainter
Paints the full colour wheel for WheelPicker.
HueRingGestureDetector
Gesture detector for the hue ring.
HueRingPainter
Paints the hue ring for HueRingPicker.
HueRingPicker
A hue ring colour picker with an inner saturation/value palette.
Indicator
A compound indicator widget used by the wheel picker to display the selected colour alongside value and alpha sliders.
IndicatorPainter
Painter that renders a checkerboard background with a solid colour circle on top — the canvas-level implementation behind ColorIndicator.
RectanglePaletteGestureDetector
Gesture detector for rectangular (square) colour palettes.
RGBWithBlueColorPainter
Paints an RGB palette where blue is the free variable.
RGBWithGreenColorPainter
Paints an RGB palette where green is the free variable.
RGBWithRedColorPainter
Paints an RGB palette where red is the free variable.
SimpleHSVGestureDetector
Gesture detector for the inner HSV palette inside a hue ring.
SlidePicker
A slider-based colour picker that breaks colour into individual channels.
SquarePicker
A rectangular 2D palette colour picker with a configurable colour model.
ThumbPainter
Paints the draggable thumb indicator for a ColourPickerSlider.
TrackPainter
Paints the gradient track for a ColourPickerSlider.
WheelGestureDetector
Gesture detector for the circular colour wheel.
WheelPicker
A circular colour wheel picker with value/alpha sliders.