Render dim bg in all renderers

Fixes #3534
This commit is contained in:
Daniel Imms
2022-07-24 10:59:24 -07:00
parent cbb13aa4d4
commit f4ffb13ece
4 changed files with 63 additions and 1 deletions
+5
View File
@@ -84,6 +84,11 @@ export namespace color {
};
}
export function multiplyOpacity(color: IColor, factor: number): IColor {
const a = color.rgba & 0xFF;
return opacity(color, (a * factor) / 0xFF);
}
export function toColorRGB(color: IColor): IColorRGB {
return [(color.rgba >> 24) & 0xFF, (color.rgba >> 16) & 0xFF, (color.rgba >> 8) & 0xFF];
}