contrastOver function

double contrastOver(
  1. int fg,
  2. int bg
)

Contrast of a possibly translucent fg composited over opaque bg, against bg.

Implementation

double contrastOver(int fg, int bg) => contrastRatio(compositeOver(fg, bg), bg);