build static method

List<double> build({
  1. double brightness = 0,
  2. double contrast = 1,
  3. double saturation = 1,
  4. double hue = 0,
})

Implementation

static List<double> build({double brightness = 0, double contrast = 1, double saturation = 1, double hue = 0}) {
  List<double> matrix = identity();
  if (hue != 0) matrix = multiply(_hue(hue), matrix);
  if (saturation != 1) matrix = multiply(_saturation(saturation), matrix);
  if (contrast != 1) matrix = multiply(_contrast(contrast), matrix);
  if (brightness != 0) matrix = multiply(_brightness(brightness), matrix);
  return matrix;
}