https://github.com/e200/pixel_color_picker
Pick colors from pixels of everything visible in your Flutter apps
https://github.com/e200/pixel_color_picker
Last synced: 4 months ago
JSON representation
Pick colors from pixels of everything visible in your Flutter apps
- Host: GitHub
- URL: https://github.com/e200/pixel_color_picker
- Owner: e200
- License: other
- Created: 2020-12-06T17:03:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-06T16:35:11.000Z (over 5 years ago)
- Last Synced: 2023-08-20T22:55:52.072Z (almost 3 years ago)
- Language: Dart
- Size: 152 KB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pixel_color_picker
A widget that extracts colors from its childs.
This package lets you basically extract colors from everything in your screen.
![Screenshot][screenshot]
## Getting Started
In the pubspec.yaml of your flutter project, add the following dependency:
```yaml
dependencies:
...
pixel_color_picker:
```
Import the package in your code:
```dart
import 'package:local_hero/local_hero.dart';
```
## Usage
Wrap the target widget inside `PixelColorPicker`:
```dart
PixelColorPicker(
child: Image.asset('image.png'),
onChanged: (color) {
setState(() {
this.color = color;
});
}
);
```
And whenever the user taps the child, the `onChanged` event will give the color of the pixel on that position.
It's still under development, but you can already play with it.
## Contributions
Any contribution to this project is welcome.
If you find a bug or want a feature, but don't know how to fix/implement it, please fill an [issue][issue].
If you fixed a bug or implemented a feature, please send a [pull request][pr].
[pub_badge]: https://img.shields.io/pub/v/pixel_color_picker.svg
[pub_dev]: https://pub.dartlang.org/packages/pixel_color_picker
[issues]: https://github.com/e200/pixel_color_picker/issues
[pull_requests]: https://github.com/e200/pixel_color_picker/pulls
[screenshot]: https://raw.githubusercontent.com/e200/pixel_color_picker/master/screenshots/screenshot.gif