colorpicker
library
Classes
-
AlphaPainter
-
Custom painter for rendering a checkerboard pattern to indicate transparency.
-
AlphaSlider
-
Opacity slider widget with checkerboard pattern background.
-
AngleInputDialer
-
Circular dialer widget for visually setting gradient rotation angle.
-
BlendModeDropdown
-
Custom dropdown widget using MenuAnchor for blend mode selection.
-
ColorHexInput
-
Hex color input field widget with format validation and auto-formatting.
-
ColorPicker
-
Main color picker widget with all components.
-
ColorPickerDialog
-
Complete dialog wrapper for color picker.
-
ColorPickerLayersControlPanel
-
Layers control panel for color picker.
-
ColorPickerPanel
-
Simplified color picker panel with a clean layout:
-
Calculates the default popup height from the widget layouts that compose a
ColorPickerPanel.
-
ColorPickerRow
-
A horizontal color picker row with swatch and inline text inputs.
-
ColorPickerStorage
-
Storage service for color picker data (recent colors, preferences).
-
ColorPickerTrigger
-
A clickable widget that opens a color picker popup.
-
ColorPreset
-
Represents a color preset with optional label.
Uses PaintSwatch to support solid colors and all gradient types.
-
ColorPresetsView
-
Display grid of preset colors.
-
ColorStop
-
A position-color pair representing a gradient stop.
-
ColorTile
-
Individual color tile widget for displaying colors in grids.
-
DefaultPresetLibrary
-
Default preset library for the Codelessly Color Picker.
-
GradientAlphaInput
-
Alpha/opacity input widget with drag support.
-
GradientEditor
-
Widget for editing gradient stops with visual controls.
-
GradientRotationInput
-
Widget for inputting gradient rotation angle with a visual dialer.
-
GradientStopsList
-
Editable list of gradient stops.
-
HexColorInputFormatter
-
Custom formatter for hex color input that handles pasted values with #.
-
ImagePickerWidget
-
Simple image picker widget that displays a button to pick images.
-
LayerData
-
Data model representing a paint layer with color, blend mode, and paint type.
-
LayerInfoPanel
-
Widget that displays information about a selected layer.
-
LayersList
-
Widget that displays a list of selectable and rearrangeable layers.
-
LayersPreview
-
Widget that renders a preview of multiple layers composited together.
-
PaintData
-
Unified paint model representing all paint types (solid, gradients).
-
PaintState
-
Encapsulates all paint-related state for a color picker.
-
PaintSwatch
-
A paint swatch for display in recent colors, presets, and libraries.
-
PaintTypeDropdown
-
Custom dropdown widget using MenuAnchor to fix z-index issues in popups.
-
Palette
-
2D color palette widget for saturation and brightness selection.
-
PresetLibraryEntry
-
Represents a preset library entry (collection of colors or gradients).
Each entry is a named collection/palette containing multiple paint swatches.
-
PresetLibraryView
-
Preset library view for displaying style sheet colors.
-
RainbowSlider
-
Hue slider widget displaying the full color spectrum.
-
RecentColorsManager
-
Helper class to manage recent colors with automatic persistence.
-
RecentColorsView
-
Display grid of recent colors and gradients.
-
RotationAnglePainter
-
-
UpperCaseTextFormatter
-
Text input formatter that converts text to uppercase.
Enums
-
BlendModeType
-
Blend mode enum for color panel layer controls.
-
PaintType
-
Paint type enum for color picker mode selection.
Functions
-
colorToHex(Color color, {bool withAlpha = false, bool withHashtag = false})
→ String
-
Converts a Color to a hex string representation.
-
hexToColor(String hex, {Color? fallback})
→ Color?
-
Parses a hex string to a Color object.
-
isValidHex(String hex, {bool withAlpha = false})
→ bool
-
Validates whether a string is a valid hex color format.
-
normalizeHex(String hex, {bool withAlpha = false})
→ String
-
Normalizes a hex string to a standard format.
-
parseHex(String hex, {bool withAlpha = false})
→ String
-
Parses and normalizes a hex color string.
-
showColorPickerDialog({required BuildContext context, required Color initialColor, String title = 'Select Color', bool allowOpacity = true, bool showRecentColors = true, bool showPresets = true, bool showPresetLibrary = true, List<ColorPreset>? presets, List<PresetLibraryEntry>? presetLibrary, List<PaintSwatch>? recentSwatches, ValueChanged<PaintSwatch>? onRecentSwatchAdd, VoidCallback? onCreatePreset, ValueChanged<Color>? onPresetLibrarySelected})
→ Future<Color?>
-
Convenience function to show color picker in a dialog.