contrast static method
Implementation
static List<double> contrast(double value) {
double adj = value * 255;
double factor = (259 * (adj + 255)) / (255 * (259 - adj));
double offset = 128 * (1 - factor);
return [
factor,
0,
0,
0,
offset,
0,
factor,
0,
0,
offset,
0,
0,
factor,
0,
offset,
0,
0,
0,
1,
0
];
}