@tioniq/sceniq 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ /** An immutable RGBA colour, channels 0 to 255. `toString` gives `#rrggbbaa`. */
2
+ declare class Color {
3
+ readonly r: number;
4
+ readonly g: number;
5
+ readonly b: number;
6
+ readonly a: number;
7
+ constructor(r: number, g: number, b: number, a?: number);
8
+ grayscale(): Color;
9
+ toString(): string;
10
+ toRgbString(): string;
11
+ toHexString(): string;
12
+ toHexWithoutAlphaString(): string;
13
+ lighter(percent: number): Color;
14
+ darker(percent: number): Color;
15
+ withRed(red: number): Color;
16
+ withGreen(green: number): Color;
17
+ withBlue(blue: number): Color;
18
+ withAlpha(alpha: number): Color;
19
+ withOpacity(opacity: number): Color;
20
+ blendWithBackground(background: Color): Color;
21
+ equals(color: Color): boolean;
22
+ static parse(color: string): Color;
23
+ static readonly black: Color;
24
+ static readonly white: Color;
25
+ static readonly red: Color;
26
+ static readonly green: Color;
27
+ static readonly blue: Color;
28
+ static readonly transparent: Color;
29
+ static fromRgb(r: number, g: number, b: number, a?: number): Color;
30
+ static fromHsl(h: number, s: number, l: number, a?: number): Color;
31
+ static interpolate(from: Color, to: Color, progress: number): Color;
32
+ }
33
+
34
+ export { Color as C };
@@ -0,0 +1,34 @@
1
+ /** An immutable RGBA colour, channels 0 to 255. `toString` gives `#rrggbbaa`. */
2
+ declare class Color {
3
+ readonly r: number;
4
+ readonly g: number;
5
+ readonly b: number;
6
+ readonly a: number;
7
+ constructor(r: number, g: number, b: number, a?: number);
8
+ grayscale(): Color;
9
+ toString(): string;
10
+ toRgbString(): string;
11
+ toHexString(): string;
12
+ toHexWithoutAlphaString(): string;
13
+ lighter(percent: number): Color;
14
+ darker(percent: number): Color;
15
+ withRed(red: number): Color;
16
+ withGreen(green: number): Color;
17
+ withBlue(blue: number): Color;
18
+ withAlpha(alpha: number): Color;
19
+ withOpacity(opacity: number): Color;
20
+ blendWithBackground(background: Color): Color;
21
+ equals(color: Color): boolean;
22
+ static parse(color: string): Color;
23
+ static readonly black: Color;
24
+ static readonly white: Color;
25
+ static readonly red: Color;
26
+ static readonly green: Color;
27
+ static readonly blue: Color;
28
+ static readonly transparent: Color;
29
+ static fromRgb(r: number, g: number, b: number, a?: number): Color;
30
+ static fromHsl(h: number, s: number, l: number, a?: number): Color;
31
+ static interpolate(from: Color, to: Color, progress: number): Color;
32
+ }
33
+
34
+ export { Color as C };