quantize_dart 1.0.3 copy "quantize_dart: ^1.0.3" to clipboard
quantize_dart: ^1.0.3 copied to clipboard

A package for color quantization, the Dart implementation of quantize.

example/main.dart

import 'package:quantize_dart/quantize_dart.dart';

void main() {

  final arrayOfPixels = [[190,197,190], [202,204,200], [207,214,210], [211,214,211], [205,207,207]];
  final maximumColorCount = 4;
  final colorMap = quantize(arrayOfPixels, maximumColorCount);

  final palette = [[204,204,204], [208,212,212], [188,196,188], [212,204,196]];
  print(palette);

  final palette2 = colorMap.map(arrayOfPixels[0]);
  print(palette2);

}
2
likes
40
pub points
54%
popularity

Publisher

unverified uploader

A package for color quantization, the Dart implementation of quantize.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on quantize_dart