Skip to content

Commit

Permalink
remove function
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodBoyDigital committed Apr 26, 2024
1 parent 36aa619 commit 479fc38
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/scene/container/utils/mixColors.ts
Expand Up @@ -36,26 +36,3 @@ export function mixStandardAnd32BitColors(localColorRGB: number, localAlpha: num

return sharedBGRColor + (globalAlpha << 24);
}

/**
* Takes two hex colors, multiplies them together and returns the result.
* @param color1 - the first color to multiply
* @param color2 - the second color to multiply
* @returns - the multiplied color
*/
export function multiplyHexColors(color1: number, color2: number): number
{
const r1 = (color1 >> 16) & 0xFF;
const g1 = (color1 >> 8) & 0xFF;
const b1 = color1 & 0xFF;

const r2 = (color2 >> 16) & 0xFF;
const g2 = (color2 >> 8) & 0xFF;
const b2 = color2 & 0xFF;

const r = r1 * r2;
const g = g1 * g2;
const b = b1 * b2;

return (r << 16) + (g << 8) + b;
}

0 comments on commit 479fc38

Please sign in to comment.