stop calc when color is opaque
This commit is contained in:
parent
bd0f460c56
commit
36ec8de04f
|
@ -940,6 +940,9 @@
|
||||||
realColor.g = Math.round(g * q1 + realColor.g * q2);
|
realColor.g = Math.round(g * q1 + realColor.g * q2);
|
||||||
realColor.b = Math.round(b * q1 + realColor.b * q2);
|
realColor.b = Math.round(b * q1 + realColor.b * q2);
|
||||||
realColor.a = mixedA;
|
realColor.a = mixedA;
|
||||||
|
if (Math.abs(realColor.a - 1) < 1e-3) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// https://www.w3.org/TR/AERT#color-contrast
|
// https://www.w3.org/TR/AERT#color-contrast
|
||||||
const {r, g, b} = realColor;
|
const {r, g, b} = realColor;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user