June 26, 2020

226 words 2 mins read

rxlabz/cyclop

rxlabz/cyclop

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

repo name rxlabz/cyclop
repo link https://github.com/rxlabz/cyclop
homepage https://rxlabz.github.io/cyclop
language Dart
size (curr.) 16325 kB
stars (curr.) 59
created 2020-06-29
license MIT License

Cyclop

Cyclop logo

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

Demo

Desktop & tablet Mobile
Cyclop desktop eyedropper Cyclop onmobile
Material HSL RVB Custom
Cyclop material Cyclop hsl Cyclop hsl Cyclop hsl
Light theme Dark theme
Cyclop light Cyclop dark

Eyedropper

Select a color from your Flutter mobile or desktop screen.

Cyclop eye dropper

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(enableEyePicker = true),
              boxShape: BoxShape.rectangle, // default : circle
              size: 32,
              swatches: swatches,
              onColorChanged: (value) => setState(() => color1 = value),
            ),
          ),
        ),
      ),
    );
  }

Customisable

  • disable opacity slider
  • disable eye dropping
  • disable swatch library
  • Circle or Square color buttons
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( () => color1 = value ),
 );

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