Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

A Flutter color palette with an eyedropper, HSL, RGB and Material colors

Cyclop

A flutter color palette with an eyedropper ( on mobile & desktop )

Demo

Desktop & tabletMobile
MaterialHSLRVBCustom
Light themeDark theme

Eyedropper

Select a color from your Flutter mobile or desktop screen.

To use the eyedropper ( Flutter mobile & desktop ) you need to wrap the app in the EyeDrop widget.

@override
  Widget build(BuildContext context) {
    return EyeDrop(
      child: Builder(
        builder: (context) => Scaffold(
          backgroundColor: backgroundColor,
          body: Container(
            child: ColorButton(
              key: Key('c1'),
              color: color1,
              config: ColorPickerConfig(enableLibrary: false),
              boxShape: BoxShape.rectangle, // default : circle
              size: 32,
              swatches: swatches,
              onColorChanged: (value) => setState(() => color4 = value),
            ),
          ),
        ),
      ),
    );
  }

Customizable

ColorButton(
  key: Key('c1'),
  color: color1,
  config: ColorPickerConfig(
    this.enableOpacity = true,
    this.enableLibrary = false,
    this.enableEyePicker = true,
  ),
  boxShape: BoxShape.rectangle, // default : circle
  size: 32,
  swatches: swatches,
  onColorChanged: (value) => setState( () => color4 = value ),
 );

ColorButton(
  key: Key('c2'),
  color: color2,
  config: ColorPickerConfig(enableEyePicker: false),
  size: 64,
  swatches: swatches,
  onColorChanged: (value) => setState( () => color4 = value ),
  onSwatchesChanged: (newSwatches) => setState(() => swatches = newSwatches),
 );

Download Flutter color palette source code on GitHub

https://github.com/rxlabz/cyclop

Exit mobile version