colors
colors copied to clipboard
How did you calculate the alpha colors?
Hi,
i was wondering how you calculated the alpha colors to be the same colors as the non alpha colors?
i tried it with this formular but it's not matching the exact same color:
const [r1, g1, b1] = originalRgbColor;
const [r2, g2, b2] = backgroundRgbColor;
const alphaRgbColor = [
(r1 - r2) / alpha + r2,
(g1 - g2) / alpha + g2,
(b1 - b2) / alpha + b2,
alpha
];
Is there another formular to calculate the alpha color?