contrast static method

double contrast(
  1. dynamic rgb1,
  2. dynamic rgb2
)

Implementation

static double contrast(rgb1, rgb2) {
  return luminance(rgb2[0], rgb2[1], rgb2[2]) /
      luminance(rgb1[0], rgb1[1], rgb1[2]);
}