@breadstone/mosaik-elements-foundation 0.0.175 → 0.0.176
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.
- package/Controls/Controllers/ColorController.d.ts +201 -25
- package/Controls/Controllers/ColorController.d.ts.map +1 -1
- package/Controls/Controllers/ColorController.js +388 -139
- package/Controls/Controllers/ColorController.js.map +1 -1
- package/Routing/PathToRegexp.d.ts +1 -1
- package/Theming/Utils.Complementary.d.ts.map +1 -1
- package/Theming/Utils.Complementary.js +4 -3
- package/Theming/Utils.Complementary.js.map +1 -1
- package/Theming/Utils.Material.2014.2.d.ts.map +1 -1
- package/Theming/Utils.Material.2014.2.js +4 -5
- package/Theming/Utils.Material.2014.2.js.map +1 -1
- package/Theming/Utils.Material.2014.d.ts.map +1 -1
- package/Theming/Utils.Material.2014.js +8 -3
- package/Theming/Utils.Material.2014.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,14 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { type Color } from 'chroma-js';
|
|
2
|
+
import { ControllerBase, type ControllerHost } from './Abstracts/ControllerBase';
|
|
3
|
+
export interface RGB {
|
|
4
|
+
r: number;
|
|
5
|
+
g: number;
|
|
6
|
+
b: number;
|
|
7
|
+
}
|
|
8
|
+
export interface RGBA extends RGB {
|
|
9
|
+
a: number;
|
|
10
|
+
}
|
|
11
|
+
export interface HSL {
|
|
12
|
+
h: number;
|
|
13
|
+
s: number;
|
|
14
|
+
l: number;
|
|
15
|
+
}
|
|
16
|
+
export interface HSLA extends HSL {
|
|
17
|
+
a: number;
|
|
18
|
+
}
|
|
19
|
+
export interface HSV {
|
|
20
|
+
h: number;
|
|
21
|
+
s: number;
|
|
22
|
+
v: number;
|
|
23
|
+
}
|
|
24
|
+
export interface HSVA extends HSV {
|
|
25
|
+
a: number;
|
|
26
|
+
}
|
|
27
|
+
export type { Color };
|
|
28
|
+
export type ColorValue = string | number | Color | HSVA | HSV | RGB | RGBA | HSL | HSLA;
|
|
8
29
|
/**
|
|
9
30
|
* The config options for a ColorController.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
10
33
|
*/
|
|
11
|
-
interface IColorControllerConfig {
|
|
34
|
+
export interface IColorControllerConfig {
|
|
12
35
|
applyColorToState({ h, s, v }: {
|
|
13
36
|
h: number;
|
|
14
37
|
s: number;
|
|
@@ -18,39 +41,192 @@ interface IColorControllerConfig {
|
|
|
18
41
|
maintains?: 'hue' | 'saturation';
|
|
19
42
|
}
|
|
20
43
|
/**
|
|
21
|
-
* ColorController - This controller is used to
|
|
44
|
+
* ColorController - This controller is used to manage color state and transformations.
|
|
22
45
|
*
|
|
23
46
|
* @public
|
|
24
47
|
*/
|
|
25
|
-
export declare class ColorController {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
v: number;
|
|
31
|
-
}) => void;
|
|
32
|
-
protected extractColorFromState: (controller: ColorController) => ColorValue;
|
|
33
|
-
protected maintains: 'hue' | 'saturation';
|
|
48
|
+
export declare class ColorController extends ControllerBase {
|
|
49
|
+
private readonly _applyColorToState;
|
|
50
|
+
private readonly _extractColorFromState;
|
|
51
|
+
private readonly _maintains;
|
|
52
|
+
private readonly _getColorProcesses;
|
|
34
53
|
private _saturation;
|
|
35
54
|
private _hue;
|
|
36
55
|
private _color;
|
|
37
56
|
private _previousColor;
|
|
38
57
|
private _format;
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a new instance of the `ColorController` class.
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
constructor(host: ControllerHost, config: IColorControllerConfig);
|
|
64
|
+
/**
|
|
65
|
+
* Gets the maintains strategy.
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
get maintains(): 'hue' | 'saturation';
|
|
70
|
+
/**
|
|
71
|
+
* Gets the current hue value.
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
41
75
|
get hue(): number;
|
|
76
|
+
/**
|
|
77
|
+
* Sets the hue value and updates the host.
|
|
78
|
+
*
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
42
81
|
set hue(value: number);
|
|
82
|
+
/**
|
|
83
|
+
* Gets the current color value.
|
|
84
|
+
*
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
43
87
|
get value(): ColorValue;
|
|
88
|
+
/**
|
|
89
|
+
* Gets the current color in the stored format.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
44
93
|
get color(): ColorValue;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the color value and updates the host.
|
|
96
|
+
*
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
45
99
|
set color(color: ColorValue);
|
|
100
|
+
/**
|
|
101
|
+
* Applies color from state using the configured extraction callback.
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
applyColorFromState(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Gets the color in a specific format.
|
|
108
|
+
*
|
|
109
|
+
* @param format - The desired color format.
|
|
110
|
+
* @returns The color value in the specified format.
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
46
113
|
getColor(format: string): ColorValue;
|
|
47
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Sets the color directly from a Color object.
|
|
116
|
+
*
|
|
117
|
+
* @param color - The color to set.
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
setColor(color: Color): void;
|
|
121
|
+
/**
|
|
122
|
+
* Gets the color as an HSL string.
|
|
123
|
+
*
|
|
124
|
+
* @returns The HSL string representation.
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
48
127
|
getHslString(): string;
|
|
128
|
+
/**
|
|
129
|
+
* Saves the current color as the previous color.
|
|
130
|
+
*
|
|
131
|
+
* @public
|
|
132
|
+
*/
|
|
49
133
|
savePreviousColor(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Restores the previously saved color.
|
|
136
|
+
*
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
50
139
|
restorePreviousColor(): void;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Processes color changes based on the maintains strategy.
|
|
142
|
+
*
|
|
143
|
+
* @param currentColor - The current color.
|
|
144
|
+
* @param nextColor - The next color value.
|
|
145
|
+
* @param format - The color format.
|
|
146
|
+
* @param isString - Whether the color is a string.
|
|
147
|
+
* @private
|
|
148
|
+
*/
|
|
149
|
+
private setColorProcess;
|
|
150
|
+
/**
|
|
151
|
+
* Sets color while maintaining the hue value.
|
|
152
|
+
*
|
|
153
|
+
* @param nextColor - The next color value.
|
|
154
|
+
* @param format - The color format.
|
|
155
|
+
* @param isString - Whether the color is a string.
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
private setColorMaintainHue;
|
|
159
|
+
/**
|
|
160
|
+
* Sets color while maintaining the saturation value.
|
|
161
|
+
*
|
|
162
|
+
* @param currentColor - The current color.
|
|
163
|
+
* @param nextColor - The next color value.
|
|
164
|
+
* @param format - The color format.
|
|
165
|
+
* @param isString - Whether the color is a string.
|
|
166
|
+
* @private
|
|
167
|
+
*/
|
|
168
|
+
private setColorMaintainSaturation;
|
|
169
|
+
/**
|
|
170
|
+
* Gets the hexadecimal color value.
|
|
171
|
+
*
|
|
172
|
+
* @param color - The color to convert.
|
|
173
|
+
* @param isString - Whether to return as string.
|
|
174
|
+
* @returns The hex color value.
|
|
175
|
+
* @private
|
|
176
|
+
*/
|
|
177
|
+
private getHexValue;
|
|
178
|
+
/**
|
|
179
|
+
* Gets the RGB color value.
|
|
180
|
+
*
|
|
181
|
+
* @param color - The color to convert.
|
|
182
|
+
* @param isString - Whether to return as string.
|
|
183
|
+
* @returns The RGB color value.
|
|
184
|
+
* @private
|
|
185
|
+
*/
|
|
186
|
+
private getRgbValue;
|
|
187
|
+
/**
|
|
188
|
+
* Gets the percentage RGB color value.
|
|
189
|
+
*
|
|
190
|
+
* @param color - The color to convert.
|
|
191
|
+
* @param isString - Whether to return as string.
|
|
192
|
+
* @returns The percentage RGB color value.
|
|
193
|
+
* @private
|
|
194
|
+
*/
|
|
195
|
+
private getPrgbValue;
|
|
196
|
+
/**
|
|
197
|
+
* Gets the 8-digit hexadecimal color value (with alpha).
|
|
198
|
+
*
|
|
199
|
+
* @param color - The color to convert.
|
|
200
|
+
* @param isString - Whether to return as string.
|
|
201
|
+
* @returns The hex8 color value.
|
|
202
|
+
* @private
|
|
203
|
+
*/
|
|
204
|
+
private getHex8Value;
|
|
205
|
+
/**
|
|
206
|
+
* Gets the named color value.
|
|
207
|
+
*
|
|
208
|
+
* @param color - The color to convert.
|
|
209
|
+
* @returns The named color value or CSS string.
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
private getNameValue;
|
|
213
|
+
/**
|
|
214
|
+
* Gets the HSL color value.
|
|
215
|
+
*
|
|
216
|
+
* @param color - The color to convert.
|
|
217
|
+
* @param isString - Whether to return as string.
|
|
218
|
+
* @returns The HSL color value.
|
|
219
|
+
* @private
|
|
220
|
+
*/
|
|
221
|
+
private getHslValue;
|
|
222
|
+
/**
|
|
223
|
+
* Gets the HSV color value.
|
|
224
|
+
*
|
|
225
|
+
* @param color - The color to convert.
|
|
226
|
+
* @param isString - Whether to return as string.
|
|
227
|
+
* @returns The HSV color value.
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
private getHsvValue;
|
|
55
231
|
}
|
|
56
232
|
//# sourceMappingURL=ColorController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorController.d.ts","sourceRoot":"","sources":["../../../src/Controls/Controllers/ColorController.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"Col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AQG;IACH,OAAO,CAAC,0BAA0B;IA0BlC;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;IAQnB;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;IAanB;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAiBpB;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAKpB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAIpB;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;IAkCnB;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;CAoCtB"}
|
|
@@ -1,235 +1,484 @@
|
|
|
1
1
|
// #region Imports
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export const replaceHueRegExp = /(^hs[v|l]a?\()\d{1,3}/;
|
|
6
|
-
const getHexValue = (color, isString) => isString ? color.toHexString() : color.toHex();
|
|
2
|
+
import chroma from 'chroma-js';
|
|
3
|
+
import { ControllerBase } from './Abstracts/ControllerBase';
|
|
4
|
+
const extractHueAndSaturationRegExp = /^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/;
|
|
7
5
|
/**
|
|
8
|
-
* ColorController - This controller is used to
|
|
6
|
+
* ColorController - This controller is used to manage color state and transformations.
|
|
9
7
|
*
|
|
10
8
|
* @public
|
|
11
9
|
*/
|
|
12
|
-
export class ColorController {
|
|
10
|
+
export class ColorController extends ControllerBase {
|
|
13
11
|
// #region Fields
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
_applyColorToState;
|
|
13
|
+
_extractColorFromState;
|
|
14
|
+
_maintains;
|
|
15
|
+
_getColorProcesses;
|
|
18
16
|
_saturation;
|
|
19
|
-
_hue
|
|
20
|
-
_color
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
v: 1
|
|
24
|
-
});
|
|
25
|
-
_previousColor = new TinyColor({
|
|
26
|
-
h: 0,
|
|
27
|
-
s: 1,
|
|
28
|
-
v: 1
|
|
29
|
-
});
|
|
30
|
-
_format = {
|
|
31
|
-
format: '',
|
|
32
|
-
isString: false
|
|
33
|
-
};
|
|
17
|
+
_hue;
|
|
18
|
+
_color;
|
|
19
|
+
_previousColor;
|
|
20
|
+
_format;
|
|
34
21
|
// #endregion
|
|
35
22
|
// #region Ctor
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new instance of the `ColorController` class.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
36
28
|
constructor(host, config) {
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
29
|
+
super(host);
|
|
30
|
+
this._applyColorToState = config.applyColorToState.bind(config);
|
|
31
|
+
this._extractColorFromState = config.extractColorFromState.bind(config);
|
|
32
|
+
this._maintains = config.maintains ?? 'hue';
|
|
33
|
+
this._saturation = 0;
|
|
34
|
+
this._hue = 0;
|
|
35
|
+
this._color = chroma.hsv(0, 1, 1);
|
|
36
|
+
this._previousColor = chroma.hsv(0, 1, 1);
|
|
37
|
+
this._format = {
|
|
38
|
+
format: '',
|
|
39
|
+
isString: false
|
|
40
|
+
};
|
|
41
|
+
this._getColorProcesses = {
|
|
42
|
+
rgb: (color, isString) => this.getRgbValue(color, isString),
|
|
43
|
+
prgb: (color, isString) => this.getPrgbValue(color, isString),
|
|
44
|
+
hex8: (color, isString) => this.getHex8Value(color, isString),
|
|
45
|
+
name: (color) => this.getNameValue(color),
|
|
46
|
+
hsl: (color, isString) => this.getHslValue(color, isString),
|
|
47
|
+
hsv: (color, isString) => this.getHsvValue(color, isString),
|
|
48
|
+
hex: (color, isString) => this.getHexValue(color, isString),
|
|
49
|
+
hex3: (color, isString) => this.getHexValue(color, isString),
|
|
50
|
+
hex4: (color, isString) => this.getHexValue(color, isString),
|
|
51
|
+
hex6: (color, isString) => this.getHexValue(color, isString)
|
|
52
|
+
};
|
|
41
53
|
}
|
|
42
54
|
// #endregion
|
|
43
|
-
// #region
|
|
44
|
-
|
|
45
|
-
|
|
55
|
+
// #region Properties
|
|
56
|
+
/**
|
|
57
|
+
* Gets the maintains strategy.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
get maintains() {
|
|
62
|
+
return this._maintains;
|
|
46
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Gets the current hue value.
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
47
69
|
get hue() {
|
|
48
70
|
return this._hue;
|
|
49
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Sets the hue value and updates the host.
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
50
77
|
set hue(value) {
|
|
51
78
|
const hue = Math.min(360, Math.max(0, value));
|
|
52
79
|
if (hue === this.hue) {
|
|
53
80
|
return;
|
|
54
81
|
}
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this._color = new TinyColor({
|
|
59
|
-
h: hue,
|
|
60
|
-
s,
|
|
61
|
-
v
|
|
62
|
-
});
|
|
82
|
+
const [, s, v] = this._color.hsv();
|
|
83
|
+
const alpha = this._color.alpha();
|
|
84
|
+
this._color = chroma.hsv(hue, s, v).alpha(alpha);
|
|
63
85
|
this._hue = hue;
|
|
64
|
-
this.host.requestUpdate(
|
|
86
|
+
this.host.requestUpdate();
|
|
65
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Gets the current color value.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
66
93
|
get value() {
|
|
67
94
|
return this.color;
|
|
68
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Gets the current color in the stored format.
|
|
98
|
+
*
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
69
101
|
get color() {
|
|
70
|
-
return this.
|
|
102
|
+
return this._getColorProcesses[this._format.format || 'hex'](this._color, this._format.isString);
|
|
71
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Sets the color value and updates the host.
|
|
106
|
+
*
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
72
109
|
set color(color) {
|
|
73
110
|
if (color === this.color) {
|
|
74
111
|
return;
|
|
75
112
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
113
|
+
if (typeof color === 'string' || typeof color === 'number') {
|
|
114
|
+
this._color = chroma(color);
|
|
115
|
+
}
|
|
116
|
+
else if (typeof color === 'object' && 'hex' in color) {
|
|
117
|
+
this._color = color;
|
|
118
|
+
}
|
|
119
|
+
else if (typeof color === 'object') {
|
|
120
|
+
if ('r' in color && 'g' in color && 'b' in color && 'a' in color) {
|
|
121
|
+
const rgba = color;
|
|
122
|
+
this._color = chroma(rgba.r, rgba.g, rgba.b).alpha(rgba.a);
|
|
123
|
+
}
|
|
124
|
+
else if ('r' in color && 'g' in color && 'b' in color) {
|
|
125
|
+
const rgb = color;
|
|
126
|
+
this._color = chroma(rgb.r, rgb.g, rgb.b);
|
|
127
|
+
}
|
|
128
|
+
else if ('h' in color && 's' in color && 'l' in color && 'a' in color) {
|
|
129
|
+
const hsla = color;
|
|
130
|
+
this._color = chroma.hsl(hsla.h, hsla.s, hsla.l).alpha(hsla.a);
|
|
131
|
+
}
|
|
132
|
+
else if ('h' in color && 's' in color && 'l' in color) {
|
|
133
|
+
const hsl = color;
|
|
134
|
+
this._color = chroma.hsl(hsl.h, hsl.s, hsl.l);
|
|
135
|
+
}
|
|
136
|
+
else if ('h' in color && 's' in color && 'v' in color && 'a' in color) {
|
|
137
|
+
const hsva = color;
|
|
138
|
+
this._color = chroma.hsv(hsva.h, hsva.s, hsva.v).alpha(hsva.a);
|
|
139
|
+
}
|
|
140
|
+
else if ('h' in color && 's' in color && 'v' in color) {
|
|
141
|
+
const hsv = color;
|
|
142
|
+
this._color = chroma.hsv(hsv.h, hsv.s, hsv.v);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
let format = 'hex';
|
|
146
|
+
const isString = typeof color === 'string';
|
|
147
|
+
if (typeof color === 'string') {
|
|
148
|
+
if (color.startsWith('#'))
|
|
149
|
+
format = 'hex';
|
|
150
|
+
else if (color.startsWith('rgb'))
|
|
151
|
+
format = 'rgb';
|
|
152
|
+
else if (color.startsWith('hsl'))
|
|
153
|
+
format = 'hsl';
|
|
154
|
+
else if (color.startsWith('hsv'))
|
|
155
|
+
format = 'hsv';
|
|
156
|
+
}
|
|
157
|
+
else if (typeof color === 'object') {
|
|
158
|
+
if ('h' in color && 's' in color && 'v' in color)
|
|
159
|
+
format = 'hsv';
|
|
160
|
+
else if ('h' in color && 's' in color && 'l' in color)
|
|
161
|
+
format = 'hsl';
|
|
162
|
+
else if ('r' in color && 'g' in color && 'b' in color)
|
|
163
|
+
format = 'rgb';
|
|
82
164
|
}
|
|
83
165
|
this._format = {
|
|
84
166
|
format,
|
|
85
167
|
isString
|
|
86
168
|
};
|
|
87
169
|
this.setColorProcess(this._color, color, format, isString);
|
|
88
|
-
this.host.requestUpdate(
|
|
170
|
+
this.host.requestUpdate();
|
|
89
171
|
}
|
|
172
|
+
// #endregion
|
|
173
|
+
// #region Methods
|
|
174
|
+
/**
|
|
175
|
+
* Applies color from state using the configured extraction callback.
|
|
176
|
+
*
|
|
177
|
+
* @public
|
|
178
|
+
*/
|
|
179
|
+
applyColorFromState() {
|
|
180
|
+
const colorValue = this._extractColorFromState(this);
|
|
181
|
+
this._color = typeof colorValue === 'string' || typeof colorValue === 'number' ? chroma(colorValue) : colorValue;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Gets the color in a specific format.
|
|
185
|
+
*
|
|
186
|
+
* @param format - The desired color format.
|
|
187
|
+
* @returns The color value in the specified format.
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
90
190
|
getColor(format) {
|
|
91
|
-
|
|
92
|
-
hsl
|
|
93
|
-
|
|
94
|
-
|
|
191
|
+
if (format === 'hsl') {
|
|
192
|
+
const [h, s, l] = this._color.hsl();
|
|
193
|
+
return {
|
|
194
|
+
h,
|
|
195
|
+
s,
|
|
196
|
+
l,
|
|
197
|
+
a: this._color.alpha()
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
return this._color.hex();
|
|
95
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Sets the color directly from a Color object.
|
|
204
|
+
*
|
|
205
|
+
* @param color - The color to set.
|
|
206
|
+
* @public
|
|
207
|
+
*/
|
|
96
208
|
setColor(color) {
|
|
97
209
|
this._color = color;
|
|
98
|
-
const isString =
|
|
99
|
-
|
|
100
|
-
this.setColorProcess(this._color, color,
|
|
210
|
+
const isString = false;
|
|
211
|
+
const format = 'hex';
|
|
212
|
+
this.setColorProcess(this._color, color, format, isString);
|
|
101
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Gets the color as an HSL string.
|
|
216
|
+
*
|
|
217
|
+
* @returns The HSL string representation.
|
|
218
|
+
* @public
|
|
219
|
+
*/
|
|
102
220
|
getHslString() {
|
|
103
|
-
return this._color.
|
|
221
|
+
return this._color.css('hsl');
|
|
104
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Saves the current color as the previous color.
|
|
225
|
+
*
|
|
226
|
+
* @public
|
|
227
|
+
*/
|
|
105
228
|
savePreviousColor() {
|
|
106
|
-
this._previousColor = this._color.
|
|
229
|
+
this._previousColor = chroma(this._color.hex());
|
|
107
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Restores the previously saved color.
|
|
233
|
+
*
|
|
234
|
+
* @public
|
|
235
|
+
*/
|
|
108
236
|
restorePreviousColor() {
|
|
109
237
|
this.setColor(this._previousColor);
|
|
110
238
|
}
|
|
111
|
-
|
|
112
|
-
|
|
239
|
+
/**
|
|
240
|
+
* Processes color changes based on the maintains strategy.
|
|
241
|
+
*
|
|
242
|
+
* @param currentColor - The current color.
|
|
243
|
+
* @param nextColor - The next color value.
|
|
244
|
+
* @param format - The color format.
|
|
245
|
+
* @param isString - Whether the color is a string.
|
|
246
|
+
* @private
|
|
247
|
+
*/
|
|
113
248
|
setColorProcess(currentColor, nextColor, format, isString) {
|
|
114
|
-
if (this.
|
|
115
|
-
this.setColorMaintainHue(
|
|
249
|
+
if (this._maintains === 'hue') {
|
|
250
|
+
this.setColorMaintainHue(nextColor, format, isString);
|
|
116
251
|
}
|
|
117
|
-
else
|
|
252
|
+
else {
|
|
118
253
|
this.setColorMaintainSaturation(currentColor, nextColor, format, isString);
|
|
119
254
|
}
|
|
120
255
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
256
|
+
/**
|
|
257
|
+
* Sets color while maintaining the hue value.
|
|
258
|
+
*
|
|
259
|
+
* @param nextColor - The next color value.
|
|
260
|
+
* @param format - The color format.
|
|
261
|
+
* @param isString - Whether the color is a string.
|
|
262
|
+
* @private
|
|
263
|
+
*/
|
|
264
|
+
setColorMaintainHue(nextColor, format, isString) {
|
|
265
|
+
const [h, s, v] = this._color.hsv();
|
|
266
|
+
let originalHue = undefined;
|
|
125
267
|
if (isString && format.startsWith('hs')) {
|
|
126
268
|
const values = extractHueAndSaturationRegExp.exec(nextColor);
|
|
127
269
|
if (values !== null) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
originalHue = Number(h);
|
|
270
|
+
const [, hStr] = values;
|
|
271
|
+
originalHue = Number(hStr);
|
|
131
272
|
}
|
|
132
273
|
}
|
|
133
274
|
else if (!isString && format.startsWith('hs')) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
275
|
+
if (typeof nextColor === 'object' && 'h' in nextColor) {
|
|
276
|
+
originalHue = nextColor.h;
|
|
277
|
+
}
|
|
137
278
|
}
|
|
138
279
|
this.hue = originalHue ?? h;
|
|
139
|
-
this.
|
|
280
|
+
this._applyColorToState({
|
|
140
281
|
h,
|
|
141
282
|
s,
|
|
142
283
|
v
|
|
143
284
|
});
|
|
144
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Sets color while maintaining the saturation value.
|
|
288
|
+
*
|
|
289
|
+
* @param currentColor - The current color.
|
|
290
|
+
* @param nextColor - The next color value.
|
|
291
|
+
* @param format - The color format.
|
|
292
|
+
* @param isString - Whether the color is a string.
|
|
293
|
+
* @private
|
|
294
|
+
*/
|
|
145
295
|
setColorMaintainSaturation(currentColor, nextColor, format, isString) {
|
|
146
296
|
if (isString && format.startsWith('hs')) {
|
|
147
297
|
const values = extractHueAndSaturationRegExp.exec(nextColor);
|
|
148
298
|
if (values !== null) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
this.
|
|
152
|
-
this._saturation = Number(s);
|
|
299
|
+
const [, hStr, sStr] = values;
|
|
300
|
+
this.hue = Number(hStr);
|
|
301
|
+
this._saturation = Number(sStr);
|
|
153
302
|
}
|
|
154
303
|
}
|
|
155
304
|
else if (!isString && format.startsWith('hs')) {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
305
|
+
if (typeof nextColor === 'object' && 'h' in nextColor && 's' in nextColor) {
|
|
306
|
+
const colorObj = nextColor;
|
|
307
|
+
this.hue = colorObj.h;
|
|
308
|
+
this._saturation = colorObj.s;
|
|
309
|
+
}
|
|
160
310
|
}
|
|
161
311
|
else {
|
|
162
|
-
|
|
163
|
-
const { h } = currentColor.toHsv();
|
|
312
|
+
const [h] = currentColor.hsv();
|
|
164
313
|
this.hue = h;
|
|
165
314
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
315
|
+
const [h, s, v] = currentColor.hsv();
|
|
316
|
+
this._applyColorToState({
|
|
317
|
+
h,
|
|
318
|
+
s,
|
|
319
|
+
v
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Gets the hexadecimal color value.
|
|
324
|
+
*
|
|
325
|
+
* @param color - The color to convert.
|
|
326
|
+
* @param isString - Whether to return as string.
|
|
327
|
+
* @returns The hex color value.
|
|
328
|
+
* @private
|
|
329
|
+
*/
|
|
330
|
+
getHexValue(color, isString) {
|
|
331
|
+
if (isString) {
|
|
332
|
+
return color.alpha() < 1 ? color.hex('rgba') : color.hex();
|
|
333
|
+
}
|
|
334
|
+
const hex = color.hex();
|
|
335
|
+
return hex.replace('#', '');
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Gets the RGB color value.
|
|
339
|
+
*
|
|
340
|
+
* @param color - The color to convert.
|
|
341
|
+
* @param isString - Whether to return as string.
|
|
342
|
+
* @returns The RGB color value.
|
|
343
|
+
* @private
|
|
344
|
+
*/
|
|
345
|
+
getRgbValue(color, isString) {
|
|
346
|
+
if (isString) {
|
|
347
|
+
return color.css();
|
|
348
|
+
}
|
|
349
|
+
const [r, g, b] = color.rgb();
|
|
350
|
+
return {
|
|
351
|
+
r,
|
|
352
|
+
g,
|
|
353
|
+
b,
|
|
354
|
+
a: color.alpha()
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Gets the percentage RGB color value.
|
|
359
|
+
*
|
|
360
|
+
* @param color - The color to convert.
|
|
361
|
+
* @param isString - Whether to return as string.
|
|
362
|
+
* @returns The percentage RGB color value.
|
|
363
|
+
* @private
|
|
364
|
+
*/
|
|
365
|
+
getPrgbValue(color, isString) {
|
|
366
|
+
if (isString) {
|
|
367
|
+
const [r, g, b] = color.rgb();
|
|
368
|
+
const a = color.alpha();
|
|
369
|
+
return a < 1
|
|
370
|
+
? `rgba(${(r / 255 * 100).toFixed(1)}%, ${(g / 255 * 100).toFixed(1)}%, ${(b / 255 * 100).toFixed(1)}%, ${a})`
|
|
371
|
+
: `rgb(${(r / 255 * 100).toFixed(1)}%, ${(g / 255 * 100).toFixed(1)}%, ${(b / 255 * 100).toFixed(1)}%)`;
|
|
372
|
+
}
|
|
373
|
+
const [r, g, b] = color.rgb();
|
|
374
|
+
return {
|
|
375
|
+
r: r / 255 * 100,
|
|
376
|
+
g: g / 255 * 100,
|
|
377
|
+
b: b / 255 * 100,
|
|
378
|
+
a: color.alpha()
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Gets the 8-digit hexadecimal color value (with alpha).
|
|
383
|
+
*
|
|
384
|
+
* @param color - The color to convert.
|
|
385
|
+
* @param isString - Whether to return as string.
|
|
386
|
+
* @returns The hex8 color value.
|
|
387
|
+
* @private
|
|
388
|
+
*/
|
|
389
|
+
getHex8Value(color, isString) {
|
|
390
|
+
const hex = color.hex('rgba');
|
|
391
|
+
return isString ? hex : hex.replace('#', '');
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Gets the named color value.
|
|
395
|
+
*
|
|
396
|
+
* @param color - The color to convert.
|
|
397
|
+
* @returns The named color value or CSS string.
|
|
398
|
+
* @private
|
|
399
|
+
*/
|
|
400
|
+
getNameValue(color) {
|
|
401
|
+
return color.name() || color.css();
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Gets the HSL color value.
|
|
405
|
+
*
|
|
406
|
+
* @param color - The color to convert.
|
|
407
|
+
* @param isString - Whether to return as string.
|
|
408
|
+
* @returns The HSL color value.
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
getHslValue(color, isString) {
|
|
412
|
+
if (this._maintains === 'hue') {
|
|
188
413
|
if (isString) {
|
|
189
|
-
const
|
|
190
|
-
|
|
414
|
+
const [, s, l] = color.hsl();
|
|
415
|
+
const a = color.alpha();
|
|
416
|
+
return a < 1
|
|
417
|
+
? `hsla(${this.hue}, ${(s * 100).toFixed(1)}%, ${(l * 100).toFixed(1)}%, ${a})`
|
|
418
|
+
: `hsl(${this.hue}, ${(s * 100).toFixed(1)}%, ${(l * 100).toFixed(1)}%)`;
|
|
191
419
|
}
|
|
192
|
-
|
|
193
|
-
const { s, l, a } = color.toHsl();
|
|
420
|
+
const [, s, l] = color.hsl();
|
|
194
421
|
return {
|
|
195
422
|
h: this.hue,
|
|
196
423
|
s,
|
|
197
424
|
l,
|
|
198
|
-
a
|
|
425
|
+
a: color.alpha()
|
|
199
426
|
};
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
427
|
+
}
|
|
428
|
+
if (isString) {
|
|
429
|
+
const [, , l] = color.hsl();
|
|
430
|
+
const a = color.alpha();
|
|
431
|
+
return a < 1
|
|
432
|
+
? `hsla(${this.hue}, ${this._saturation}%, ${(l * 100).toFixed(1)}%, ${a})`
|
|
433
|
+
: `hsl(${this.hue}, ${this._saturation}%, ${(l * 100).toFixed(1)}%)`;
|
|
434
|
+
}
|
|
435
|
+
const [, , l] = color.hsl();
|
|
436
|
+
return {
|
|
437
|
+
h: this.hue,
|
|
438
|
+
s: this._saturation / 100,
|
|
439
|
+
l,
|
|
440
|
+
a: color.alpha()
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Gets the HSV color value.
|
|
445
|
+
*
|
|
446
|
+
* @param color - The color to convert.
|
|
447
|
+
* @param isString - Whether to return as string.
|
|
448
|
+
* @returns The HSV color value.
|
|
449
|
+
* @private
|
|
450
|
+
*/
|
|
451
|
+
getHsvValue(color, isString) {
|
|
452
|
+
if (this._maintains === 'hue') {
|
|
216
453
|
if (isString) {
|
|
217
|
-
const
|
|
218
|
-
|
|
454
|
+
const [, s, v] = color.hsv();
|
|
455
|
+
const a = color.alpha();
|
|
456
|
+
return a < 1
|
|
457
|
+
? `hsva(${this.hue}, ${(s * 100).toFixed(1)}%, ${(v * 100).toFixed(1)}%, ${a})`
|
|
458
|
+
: `hsv(${this.hue}, ${(s * 100).toFixed(1)}%, ${(v * 100).toFixed(1)}%)`;
|
|
219
459
|
}
|
|
220
|
-
|
|
221
|
-
const { s, v, a } = color.toHsv();
|
|
460
|
+
const [, s, v] = color.hsv();
|
|
222
461
|
return {
|
|
223
462
|
h: this.hue,
|
|
224
463
|
s,
|
|
225
464
|
v,
|
|
226
|
-
a
|
|
465
|
+
a: color.alpha()
|
|
227
466
|
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
467
|
+
}
|
|
468
|
+
if (isString) {
|
|
469
|
+
const [, , v] = color.hsv();
|
|
470
|
+
const a = color.alpha();
|
|
471
|
+
return a < 1
|
|
472
|
+
? `hsva(${this.hue}, ${this._saturation}%, ${(v * 100).toFixed(1)}%, ${a})`
|
|
473
|
+
: `hsv(${this.hue}, ${this._saturation}%, ${(v * 100).toFixed(1)}%)`;
|
|
474
|
+
}
|
|
475
|
+
const [, , v] = color.hsv();
|
|
476
|
+
return {
|
|
477
|
+
h: this.hue,
|
|
478
|
+
s: this._saturation / 100,
|
|
479
|
+
v,
|
|
480
|
+
a: color.alpha()
|
|
481
|
+
};
|
|
482
|
+
}
|
|
234
483
|
}
|
|
235
484
|
//# sourceMappingURL=ColorController.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorController.js","sourceRoot":"","sources":["../../../src/Controls/Controllers/ColorController.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAElB,OAAO,EAAE,SAAS,EAAiE,MAAM,iBAAiB,CAAC;AAyB3G,MAAM,CAAC,MAAM,6BAA6B,GAAG,+CAA+C,CAAC;AAC7F,MAAM,CAAC,MAAM,6BAA6B,GAAG,+CAA+C,CAAC;AAC7F,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAExD,MAAM,WAAW,GAAG,CAAC,KAAgB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K,EAAE;SACnB,CAAC;IACN,CAAC;CAIJ"}
|
|
@@ -91,7 +91,7 @@ export interface Options {
|
|
|
91
91
|
*/
|
|
92
92
|
encode?: (value: string) => string;
|
|
93
93
|
}
|
|
94
|
-
export declare function modifierToString(modifier: Modifier): "" | "*" | "
|
|
94
|
+
export declare function modifierToString(modifier: Modifier): "" | "*" | "+" | "?";
|
|
95
95
|
/**
|
|
96
96
|
* Expose a function for taking tokens and returning a RegExp.
|
|
97
97
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.Complementary.d.ts","sourceRoot":"","sources":["../../src/Theming/Utils.Complementary.ts"],"names":[],"mappings":"AAaA,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"Utils.Complementary.d.ts","sourceRoot":"","sources":["../../src/Theming/Utils.Complementary.ts"],"names":[],"mappings":"AAaA,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0BpF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import chroma from 'chroma-js';
|
|
2
2
|
import { generateMaterialPalette } from './Utils.Material.2014.2';
|
|
3
3
|
// Function to calculate the complementary color in HSL format
|
|
4
4
|
function complementaryHSL(hsl) {
|
|
@@ -26,7 +26,8 @@ export function generateComplementaryPalette(baseHex) {
|
|
|
26
26
|
// Palette[`${step}`] = hslToHex(h, s, Math.max(0, Math.min(1, l)));
|
|
27
27
|
// });
|
|
28
28
|
// Return palette;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const [h, s, l] = chroma(baseHex).hsl();
|
|
30
|
+
const complementaryH = (h + 180) % 360;
|
|
31
|
+
return generateMaterialPalette(chroma.hsl(complementaryH, s, l).hex());
|
|
31
32
|
}
|
|
32
33
|
//# sourceMappingURL=Utils.Complementary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.Complementary.js","sourceRoot":"","sources":["../../src/Theming/Utils.Complementary.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Utils.Complementary.js","sourceRoot":"","sources":["../../src/Theming/Utils.Complementary.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,8DAA8D;AAC9D,SAAS,gBAAgB,CAAC,GAA6B;IACnD,OAAO;QACH,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC;QAClB,GAAG,CAAC,CAAC,CAAC;QACN,GAAG,CAAC,CAAC,CAAC;KACT,CAAC;AACN,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,4BAA4B,CAAC,OAAe;IACxD,qCAAqC;IACrC,2DAA2D;IAC3D,8CAA8C;IAE9C,oEAAoE;IACpE,sEAAsE;IAEtE,0BAA0B;IAC1B,uEAAuE;IAEvE,wBAAwB;IACxB,0BAA0B;IAC1B,eAAe;IACf,0DAA0D;IAC1D,iCAAiC;IACjC,QAAQ;IAER,wEAAwE;IACxE,MAAM;IAEN,kBAAkB;IAElB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC;IACxC,MAAM,cAAc,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;IACvC,OAAO,uBAAuB,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.Material.2014.2.d.ts","sourceRoot":"","sources":["../../src/Theming/Utils.Material.2014.2.ts"],"names":[],"mappings":"AAEA,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"Utils.Material.2014.2.d.ts","sourceRoot":"","sources":["../../src/Theming/Utils.Material.2014.2.ts"],"names":[],"mappings":"AAEA,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAchF"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import chroma from 'chroma-js';
|
|
2
2
|
export function generateMaterialPalette(hexColor) {
|
|
3
|
-
const baseLight =
|
|
4
|
-
const baseDark =
|
|
3
|
+
const baseLight = chroma('#ffffff');
|
|
4
|
+
const baseDark = chroma('#000000');
|
|
5
5
|
const palette = {};
|
|
6
6
|
const steps = [0, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
7
7
|
const amounts = [0, 12, 30, 50, 70, 85, 100, 87, 70, 54, 25];
|
|
8
8
|
steps.forEach((step, i) => {
|
|
9
9
|
const base = step <= 500 ? baseLight : baseDark;
|
|
10
|
-
palette[`${step}`] =
|
|
11
|
-
.toHexString();
|
|
10
|
+
palette[`${step}`] = chroma.mix(base, hexColor, amounts[i] / 100, 'rgb').hex();
|
|
12
11
|
});
|
|
13
12
|
return palette;
|
|
14
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.Material.2014.2.js","sourceRoot":"","sources":["../../src/Theming/Utils.Material.2014.2.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Utils.Material.2014.2.js","sourceRoot":"","sources":["../../src/Theming/Utils.Material.2014.2.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACpD,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC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B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"Utils.Material.2014.d.ts","sourceRoot":"","sources":["../../src/Theming/Utils.Material.2014.ts"],"names":[],"mappings":"AAQA,UAAU,SAAS;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAoHD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG;IACtC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb,CAIA;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuChF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import chroma from 'chroma-js';
|
|
2
2
|
// Helper function to convert RGB to LAB (using a standard formula)
|
|
3
3
|
function rgbToLab(_r, _g, _b) {
|
|
4
4
|
let r = _r / 255;
|
|
@@ -84,7 +84,12 @@ export function lchToRgb(lch) {
|
|
|
84
84
|
return xyzToRgb(xyz);
|
|
85
85
|
}
|
|
86
86
|
export function generateMaterialPalette(hexColor) {
|
|
87
|
-
const
|
|
87
|
+
const [r, g, b] = chroma(hexColor).rgb();
|
|
88
|
+
const rgb = {
|
|
89
|
+
r,
|
|
90
|
+
g,
|
|
91
|
+
b
|
|
92
|
+
};
|
|
88
93
|
const labColor = rgbToLab(rgb.r, rgb.g, rgb.b);
|
|
89
94
|
const lchColor = labToLch(labColor.l, labColor.a, labColor.b);
|
|
90
95
|
const palette = {};
|
|
@@ -109,7 +114,7 @@ export function generateMaterialPalette(hexColor) {
|
|
|
109
114
|
c: lchColor.c,
|
|
110
115
|
h: lchColor.h
|
|
111
116
|
});
|
|
112
|
-
const hexShade =
|
|
117
|
+
const hexShade = chroma(rgbColor.r, rgbColor.g, rgbColor.b).hex();
|
|
113
118
|
palette[`${step}`] = hexShade;
|
|
114
119
|
});
|
|
115
120
|
return palette;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.Material.2014.js","sourceRoot":"","sources":["../../src/Theming/Utils.Material.2014.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Utils.Material.2014.js","sourceRoot":"","sources":["../../src/Theming/Utils.Material.2014.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAc/B,mEAAmE;AACnE,SAAS,QAAQ,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU;IAKhD,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC;IACjB,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC;IACjB,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC;IAEjB,cAAc;IACd,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC3D,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC3D,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAE3D,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC9D,MAAM,CAAC,GAAG,CAA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AC,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;QAElE,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,QAAQ,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadstone/mosaik-elements-foundation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.176",
|
|
4
4
|
"description": "Mosaik elements components package.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "andre.wehlert <awehlert@breadstone.de> (https://www.breadstone.de)",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"url": "git+ssh://git@github.com/RueDeRennes/mosaik.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@breadstone/mosaik-elements": "^0.0.
|
|
18
|
-
"@breadstone/mosaik-themes": "^0.0.
|
|
19
|
-
"@ctrl/tinycolor": "^4.2.0",
|
|
17
|
+
"@breadstone/mosaik-elements": "^0.0.176",
|
|
18
|
+
"@breadstone/mosaik-themes": "^0.0.176",
|
|
20
19
|
"@floating-ui/dom": "^1.7.4",
|
|
21
20
|
"@lit-labs/virtualizer": "^2.1.1",
|
|
22
21
|
"@lit/task": "^1.0.3",
|
|
23
22
|
"apexcharts": "^5.3.6",
|
|
23
|
+
"chroma-js": "^3.2.0",
|
|
24
24
|
"lit": "^3.3.1",
|
|
25
25
|
"qr-creator": "^1.0.0",
|
|
26
26
|
"qrcode": "^1.5.4",
|