adjustColoration method
void
adjustColoration(
- int color, [
- num strength = 1.0
])
Implementation
void adjustColoration(int color, [num strength = 1.0]) {
final num r = colorGetR(color) * strength / 255.0;
final num g = colorGetG(color) * strength / 255.0;
final num b = colorGetB(color) * strength / 255.0;
final num i = 1.0 - strength;
_concat([
r * _lumaR + i,
r * _lumaG,
r * _lumaB,
0.0,
g * _lumaR,
g * _lumaG + i,
g * _lumaB,
0.0,
b * _lumaR,
b * _lumaG,
b * _lumaB + i,
0.0,
0.0,
0.0,
0.0,
1.0
], [
0,
0,
0,
0
]);
}