Space out exports

This commit is contained in:
Daniel Imms
2020-06-10 12:39:11 -07:00
parent 61432ab65d
commit 4c943ddb0d
+2
View File
@@ -47,6 +47,7 @@ export namespace color {
const rgba = channels.toRgba(r, g, b);
return { css, rgba };
}
export function isOpaque(color: IColor): boolean {
return (color.rgba & 0xFF) === 0xFF;
}
@@ -71,6 +72,7 @@ export namespace color {
rgba: rgbaColor
};
}
export function opacity(color: IColor, opacity: number): IColor {
const a = Math.round(opacity * 0xFF);
const [r, g, b] = rgba.toChannels(color.rgba);