@fils/color 0.1.0 → 0.1.1
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/lib/utils.d.ts +2 -0
- package/lib/utils.js +3 -0
- package/package.json +2 -2
package/lib/utils.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export type HSLColor = {
|
|
|
13
13
|
s: number;
|
|
14
14
|
l: number;
|
|
15
15
|
};
|
|
16
|
+
export type HexColor = `#${string}`;
|
|
17
|
+
export declare function isValidHexColor(color: string): color is HexColor;
|
|
16
18
|
export declare function componentToHex(c: number): string;
|
|
17
19
|
export declare function rgbToHex(color: RGBColor): string;
|
|
18
20
|
export declare function hexToRgb(hex: string): RGBColor;
|
package/lib/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fils/color",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Color Package written in TypeScript",
|
|
5
5
|
"main": "lib/main.js",
|
|
6
6
|
"repository": "git@github.com:fil-studio/fils.git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"private": false,
|
|
11
11
|
"scripts": {
|
|
12
|
-
"
|
|
12
|
+
"prepublishOnly": "yarn build",
|
|
13
13
|
"build": "tsc"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|