isDarkAtPos method

bool isDarkAtPos(
  1. double x,
  2. double y, {
  3. double? threshold,
})

Returns whether the given point is considered dark.

Coordinates are given in percent and must be between 0 and 1. Throws ArgumentError if the coordinates are out of range.

Implementation

bool isDarkAtPos(double x, double y, {double? threshold}) =>
    _getDarkness(linearRgbAt(x, y), threshold);