color_thief_flutter 0.1.0 copy "color_thief_flutter: ^0.1.0" to clipboard
color_thief_flutter: ^0.1.0 copied to clipboard

outdated

Grab the color palette from an image, the Flutter implementation of color-thief.

example/main.dart

import 'package:color_thief_flutter/color_thief_flutter.dart';
import 'package:color_thief_flutter/utils.dart';

void main() {

  // color_thief_flutter.dart

  getColorFromImage(image).then((color) {
    print(color); // [R,G,B]
  });

  getColorFromUrl('url/to/image').then((color) {
    print(color); // [R,G,B]
  });

  getPaletteFromImage(image).then((palette) {
    print(palette); // [[R,G,B]]
  });

  getPaletteFromUrl(image).then((palette) {
    print(palette); // [[R,G,B]]
  });

  getImageFromUrl('url/to/image').then((image) {
    print(image); // Image
  });

  // utils.dart

  final hsv = fromRGBtoHSV([90, 90, 90]);
  print(hsv); // [0, 0, 35]

  final rgb = fromHSVtoRGB([90, 90, 90]);
  print(rgb); // [126, 230, 23]

}
37
likes
40
pub points
58%
popularity

Publisher

unverified uploader

Grab the color palette from an image, the Flutter implementation of color-thief.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, quantize_dart

More

Packages that depend on color_thief_flutter