-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
55 lines (50 loc) · 1.74 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// import { HSL } from './interfaces';
declare module 'ts-color-class' {
interface HSL {
h: number
s: number
l: number
}
export default class Color {
constructor(any: Color);
constructor(any: string);
constructor(any: number[]);
constructor(any: HSL);
constructor(any: any);
constructor(any: Color, alpha: number);
constructor(any: string, alpha: number);
constructor(any: number[], alpha: number);
constructor(any: HSL, alpha: number);
constructor(any: any, alpha: number);
constructor(red: number, green: number, blue: number);
constructor(red: number, green: number, blue: number, alpha: number);
constructor(red?: any, green?: number, blue?: number, alpha?: number);
getRGB(): number[];
getHex(): string;
getHSL(): HSL;
alpha(alpha: number): Color;
getRed(): number;
red(r: number): Color;
getGreen(): number;
green(g: number): Color;
getBlue(): number;
blue(b: number): Color;
getAlpha(): number;
getSaturation(): number;
getHue(): number;
hue(hue: number): Color;
shiftHue(amount: number): Color;
saturation(saturation: number): Color;
saturate(amount: number): Color;
desaturate(amount: number): Color;
getLightness(): number;
lightness(lightness: number): Color;
lighten(amount: number): Color;
darken(amount: number): Color;
combine(colorValue: any, percentage: number): Color;
invert(): Color;
tint(colorValue: any, percentage: number | undefined): Color;
toString(): string;
static getNames(): any;
}
}