AnyBackground constructor
argbs must be real sampled pixels from what's behind the UI. If
downscaling first, use min/max pooling, never averaging: averaged
black and white pixels make a mid-gray that hides both. Quantizer
clusters are averages too. Alpha is ignored; every pixel is opaque.
The list is read on first use; don't modify it afterwards.
Empty means nothing is known about what's behind: see AnyBackground.unknown.
Implementation
AnyBackground(this._argbs, {required this.algo, required this.contrast}) {
if (contrast.isNaN || contrast <= 0.0 || contrast > 1.0) {
throw ArgumentError.value(contrast, 'contrast', 'must be in (0, 1]');
}
}