ismx-nexo-node-app 0.4.121 → 0.4.122
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.
|
@@ -12,7 +12,7 @@ class ColorUtils {
|
|
|
12
12
|
static rgbToHex(r, g, b) {
|
|
13
13
|
return `#${((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1)}`;
|
|
14
14
|
}
|
|
15
|
-
static hvsToHex(h,
|
|
15
|
+
static hvsToHex(h, v, s) {
|
|
16
16
|
h = ((h % 360) + 360) % 360;
|
|
17
17
|
s = Math.max(0, Math.min(100, s)) / 100;
|
|
18
18
|
v = Math.max(0, Math.min(100, v)) / 100;
|
|
@@ -5,7 +5,7 @@ export default abstract class ColorUtils {
|
|
|
5
5
|
b: number;
|
|
6
6
|
};
|
|
7
7
|
static rgbToHex(r: number, g: number, b: number): string;
|
|
8
|
-
static hvsToHex(h: number,
|
|
8
|
+
static hvsToHex(h: number, v: number, s: number): string;
|
|
9
9
|
static interpolate(color1: string, color2: string, ratio: number): string;
|
|
10
10
|
static contrast(color: string): string;
|
|
11
11
|
static transparency(color: string, transparency: number): string;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ export default abstract class ColorUtils {
|
|
|
15
15
|
return `#${((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1)}`;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
static hvsToHex(h: number,
|
|
18
|
+
static hvsToHex(h: number, v: number, s: number): string
|
|
19
19
|
{
|
|
20
20
|
h = ((h % 360) + 360) % 360;
|
|
21
21
|
s = Math.max(0, Math.min(100, s)) / 100;
|