riku
2026-01-16 1f9e43b7bbb848c7ee2aaa89ffece17002b2c915
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import tinyColor from 'tinycolor2/esm/tinycolor';
import { GradientColors, GradientColorPoint } from './gradient';
export interface ColorObject {
    alpha: number;
    css: string;
    hex: string;
    hex8: string;
    hsl: string;
    hsla: string;
    hsv: string;
    hsva: string;
    rgb: string;
    rgba: string;
    saturation: number;
    value: number;
    isGradient: boolean;
    linearGradient?: string;
}
interface ColorStates {
    s: number;
    v: number;
    h: number;
    a: number;
}
interface GradientStates {
    colors: GradientColorPoint[];
    degree: number;
    selectedId: string;
    css?: string;
}
export declare const gradientColors2string: (object: GradientColors) => string;
export declare const getColorWithoutAlpha: (color: string) => any;
export declare const genId: () => string;
export declare const genGradientPoint: (left: number, color: string) => GradientColorPoint;
export declare class Color {
    states: ColorStates;
    originColor: string;
    isGradient: boolean;
    gradientStates: GradientStates;
    constructor(input: string);
    update(input: string): void;
    get saturation(): number;
    set saturation(value: number);
    get value(): number;
    set value(value: number);
    get hue(): number;
    set hue(value: number);
    get alpha(): number;
    set alpha(value: number);
    get rgb(): string;
    get rgba(): string;
    get hsv(): string;
    get hsva(): string;
    get hsl(): string;
    get hsla(): string;
    get hex(): any;
    get hex8(): any;
    get cmyk(): string;
    get css(): string;
    get linearGradient(): string;
    get gradientColors(): GradientColorPoint[];
    set gradientColors(colors: GradientColorPoint[]);
    get gradientSelectedId(): string;
    set gradientSelectedId(id: string);
    get gradientDegree(): number;
    set gradientDegree(degree: number);
    get gradientSelectedPoint(): GradientColorPoint;
    getFormatsColorMap(): {
        HEX: any;
        CMYK: string;
        RGB: string;
        RGBA: string;
        HSL: string;
        HSLA: string;
        HSV: string;
        HSVA: string;
        CSS: string;
        HEX8: any;
    };
    updateCurrentGradientColor(): false | this;
    updateStates(input: string): void;
    getRgba(): {
        r: number;
        g: number;
        b: number;
        a: tinyColor.ColorFormats.RGBA;
    };
    getCmyk(): {
        c: number;
        m: number;
        y: number;
        k: number;
    };
    getHsva(): tinyColor.ColorFormats.HSVA;
    getHsla(): tinyColor.ColorFormats.HSLA;
    equals(color: string): boolean;
    static isValid(color: string): boolean;
    static hsva2color(h: number, s: number, v: number, a: number): any;
    static hsla2color(h: number, s: number, l: number, a: number): any;
    static rgba2color(r: number, g: number, b: number, a: number): any;
    static hex2color(hex: string, a: number): any;
    static object2color(object: any, format: string): any;
    static isGradientColor: (input: string) => boolean;
    static compare: (color1: string, color2: string) => boolean;
}
export declare const getColorObject: (color: Color) => ColorObject;
export default Color;