colors icon indicating copy to clipboard operation
colors copied to clipboard

How did you calculate the alpha colors?

Open JustGreg opened this issue 2 years ago • 0 comments

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?

JustGreg avatar Sep 05 '22 08:09 JustGreg