-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlants-color.d.ts
40 lines (40 loc) · 1.43 KB
/
lants-color.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
import { Brightness0To1 } from "./lants-device.js";
export interface LifxLanColorHSB {
hue?: number;
saturation?: number;
brightness?: Brightness0To1;
kelvin?: number;
}
type ColorComponents = {
[key in 'red' | 'green' | 'blue']?: number;
};
export interface LifxLanColorRGB extends ColorComponents {
red?: number;
green?: number;
blue?: number;
brightness?: Brightness0To1;
kelvin?: number;
}
export interface LifxLanColorXyb {
x: number;
y: number;
brightness?: number;
kelvin?: number;
}
export interface LifxLanColorCSS {
css: string;
brightness?: number;
kelvin?: number;
}
export type LifxLanColorAny = LifxLanColorCSS | LifxLanColorHSB | LifxLanColorRGB | LifxLanColorXyb;
export declare function cssToHsb(p: LifxLanColorCSS): LifxLanColorHSB;
export declare function rgbToHsb(p: LifxLanColorRGB): LifxLanColorHSB;
export declare function hsbToRgb(p: LifxLanColorHSB): LifxLanColorRGB;
export declare function rgbToXyb(p: LifxLanColorRGB): LifxLanColorXyb;
export declare function xybToRgb(p: LifxLanColorXyb): LifxLanColorRGB;
export declare function hsbToXyb(p: LifxLanColorHSB): LifxLanColorXyb;
export declare function xybToHsb(p: LifxLanColorXyb): LifxLanColorHSB;
export declare function mergeToHsb(c: LifxLanColorAny, color: LifxLanColorHSB): LifxLanColorHSB;
export declare function anyToHsb(c: LifxLanColorAny): LifxLanColorHSB;
export {};
//# sourceMappingURL=lants-color.d.ts.map