@phun-ky/moebius 0.1.1 → 0.1.3

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/README.md CHANGED
@@ -28,7 +28,7 @@
28
28
  - [toObject](#toobject)
29
29
  - [toFloat](#tofloat)
30
30
  - [Types](#types)
31
- - [Sponsor me!](#sponsor-me)
31
+ - [Sponsor me](#sponsor-me)
32
32
 
33
33
  ## About
34
34
 
@@ -393,7 +393,7 @@ console.log(color.toObject(); // "0, 63, 92"
393
393
 
394
394
  #### toFloat
395
395
 
396
- The color object exposes a `toFloat` method, that allows to objectify to float valus, as in `0-1` instead of `0-255`/`0-100` from any color unit given to either a color object for the hsl units, or default rgb:
396
+ The color object exposes a `toFloat` method, that allows to objectify to float values, as in `0-1` instead of `0-255`/`0-100` from any color unit given to either a color object for the hsl units, or default rgb:
397
397
 
398
398
  ```ts
399
399
  const color = new MoebiusColor('#003f5c');
package/moebius.d.ts CHANGED
@@ -91,10 +91,22 @@ type MoebiusPaletteDefaultOptionsType = {
91
91
  * Represents a color value in hexadecimal format.
92
92
  */
93
93
  type MoebiusColorValueHexType = `#${string}`;
94
+ /**
95
+ * Represents a color value in HSL format.
96
+ */
97
+ type MoebiusColorValueHslType = `hsl(${number}, ${string}, ${string})`;
98
+ /**
99
+ * Represents a color value in HSLA format.
100
+ */
101
+ type MoebiusColorValueHslaType = `hsl(${number}, ${string}, ${string}, ${number})`;
94
102
  /**
95
103
  * Represents a color value in RGB format.
96
104
  */
97
105
  type MoebiusColorValueRgbType = `rgb(${number}, ${number}, ${number})`;
106
+ /**
107
+ * Represents a color value in RGBA format.
108
+ */
109
+ type MoebiusColorValueRgbaType = `rgb(${number}, ${number}, ${number}, ${number})`;
98
110
  /**
99
111
  * Represents an RGB color object.
100
112
  */
@@ -168,6 +180,22 @@ type MoebiusCMYKObjectType = {
168
180
  y: number;
169
181
  k: number;
170
182
  };
183
+ /**
184
+ * Represents a color specification for nearest color matching.
185
+ */
186
+ interface NearestColorColorSpecInterface {
187
+ name: string;
188
+ source: string;
189
+ rgb: MoebiusRGBObjectType;
190
+ }
191
+ /**
192
+ * Represents a color match for nearest color matching.
193
+ */
194
+ interface NearestColorColorMatchInterface {
195
+ name: string;
196
+ value: string;
197
+ rgb: MoebiusRGBObjectType;
198
+ }
171
199
  type MoebiusChromaColorInputType = MoebiusCMYKObjectType | MoebiusLCHObjectType | MoebiusHSLObjectType | MoebiusColorValueHexType | string;
172
200
 
173
201
  /**
@@ -480,4 +508,4 @@ type MoebiusReturnType = Promise<{
480
508
  */
481
509
  declare function Moebius(): MoebiusReturnType;
482
510
 
483
- export { MoebiusReturnType, Moebius as default };
511
+ export { MoebiusCMYKObjectType, MoebiusChromaColorInputType, MoebiusColorInterface, MoebiusColorValueHexType, MoebiusColorValueHslType, MoebiusColorValueHslaType, MoebiusColorValueRgbType, MoebiusColorValueRgbaType, MoebiusHSIObjectType, MoebiusHSLObjectType, MoebiusHSVObjectType, MoebiusHWBObjectType, MoebiusLABObjectType, MoebiusLCHObjectType, MoebiusPaletteAccentColorsInterface, MoebiusPaletteColorsInterface, MoebiusPaletteDefaultOptionsType, MoebiusPaletteInterface, MoebiusPaletteOptionsType, MoebiusRGBObjectType, MoebiusReturnType, MoebiusXYZObjectType, NearestColorColorMatchInterface, NearestColorColorSpecInterface, Moebius as default };