dev-classes 1.0.8 → 1.0.9
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/dist/classes/Color.d.ts +1 -1
- package/dist/classes/Color.js +6 -6
- package/package.json +1 -1
package/dist/classes/Color.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare class Color {
|
|
|
51
51
|
static getAccentColor(baseHsv: number[], baseColor: ColorRgb, elementColor: ColorRgb): ColorRgb;
|
|
52
52
|
static changeColorAccent(baseHsv: number[], accentHsv: number[], color: ColorRgb, isDarkTheme: boolean): ColorRgb;
|
|
53
53
|
static changeBrightness(color: ColorRgb, amount: number): ColorRgb;
|
|
54
|
-
static hexBrightness(hex: string, amount: number
|
|
54
|
+
static hexBrightness(hex: string, amount: number): any;
|
|
55
55
|
static getHexColorFromTelegramColor(color: number): string;
|
|
56
56
|
static getRgbColorFromTelegramColor(color: number): ColorRgb;
|
|
57
57
|
static getColorsFromWallPaper(wallPaper: any): string;
|
package/dist/classes/Color.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var p = (l, t, n) => (
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var b = (l, t, n) => t in l ? M(l, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : l[t] = n;
|
|
3
|
+
var p = (l, t, n) => (b(l, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
const o = class o {
|
|
5
5
|
/**
|
|
6
6
|
* https://stackoverflow.com/a/54070620/6758968
|
|
@@ -159,9 +159,9 @@ const o = class o {
|
|
|
159
159
|
static changeBrightness(t, n) {
|
|
160
160
|
return t.map((e) => o.clamp(Math.round(e * n), 0, 255));
|
|
161
161
|
}
|
|
162
|
-
static hexBrightness(t, n
|
|
163
|
-
const
|
|
164
|
-
return o.rgbToHex(
|
|
162
|
+
static hexBrightness(t, n) {
|
|
163
|
+
const e = o.hexToRgb(t), r = o.changeBrightness(e, n), [s, a, i] = r;
|
|
164
|
+
return o.rgbToHex(s, a, i);
|
|
165
165
|
}
|
|
166
166
|
static getHexColorFromTelegramColor(t) {
|
|
167
167
|
const n = (t < 0 ? 16777215 + t : t).toString(16);
|