OnImageMatrix.hue constructor
OnImageMatrix.hue([
- double hue = 0.0
Matrix to control only hue
.
Implementation
OnImageMatrix.hue([double hue = 0.0])
: super.matrix([
(0.213) + (cos(hue) * 0.787) - (sin(hue) * 0.213), // RR
(0.715) - (cos(hue) * 0.715) - (sin(hue) * 0.715), // RG
(0.072) - (cos(hue) * 0.072) + (sin(hue) * 0.928), // RB
0.0, // RA
0.0, // R-OFFSET
//
(0.213) - (cos(hue) * 0.213) + (sin(hue) * 0.143), // GR
(0.715) + (cos(hue) * 0.285) + (sin(hue) * 0.140), // GG
(0.072) - (cos(hue) * 0.072) - (sin(hue) * 0.283), // GB
0.0, // GA
0.0, // G-OFFSET
//
(0.213) - (cos(hue) * 0.213) - (sin(hue) * 0.787), // BR
(0.715) - (cos(hue) * 0.715) + (sin(hue) * 0.715), // BG
(0.072) + (cos(hue) * 0.928) + (sin(hue) * 0.072), // BB
0.0, // BA
0.0, // B-OFFSET
//
0.0, // AR
0.0, // AG
0.0, // AB
1.0, // AA
0.0, // A-OFFSET
]);