UNPKG

613 BTypeScriptView Raw
1interface RGBA {
2 r: number;
3 g: number;
4 b: number;
5 a: number;
6}
7declare class Color {
8 r: number;
9 g: number;
10 b: number;
11 a: number;
12 /**
13 * @param {string|{ r: number; g: number; b: number; a: number;}} color
14 */
15 constructor(color: string | Partial<RGBA>);
16 /**
17 * @param {string} color
18 */
19 _parse(color: string): void;
20 toString(): string;
21 /**
22 * @param {string|{ r: number; g: number; b: number; a: number;}} color
23 * @param {number} ratio
24 */
25 mix(color: RGBA, ratio: number): Color;
26}
27export = Color;