simulateCvd function
Full-severity simulation of type on linear sRGB c.
Implementation
LinRgb simulateCvd(LinRgb c, Cvd type) => switch (type) {
Cvd.protan => _mul(machadoProtan, c),
Cvd.deutan => _mul(machadoDeutan, c),
Cvd.tritan => _mul(
brettelTritanNormal[0] * c.$1 +
brettelTritanNormal[1] * c.$2 +
brettelTritanNormal[2] * c.$3 >=
0
? brettelTritan1
: brettelTritan2,
c,
),
};