magic-color
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -74,7 +74,7 @@ import { ColorType, Colors, Opacity, RgbColor, HslColor, HsbColor, LabColor } from '@magic-color/core'; | ||
* | ||
* @param color theme color | ||
* @param color string color, if not provided, a random color will be generated | ||
* @param options ThemeOptions | ||
* @returns ThemeMetas | ||
*/ | ||
declare function theme(color: string, options?: ThemeOptions): ThemeMetas; | ||
declare function theme(color?: string, options?: ThemeOptions): ThemeMetas; | ||
@@ -166,2 +166,8 @@ /** | ||
/** | ||
* Generate a random color | ||
* | ||
* @param type ColorType, default is 'hex' | ||
* @returns any color type | ||
*/ | ||
declare function random(type?: ColorType): string; | ||
@@ -192,3 +198,3 @@ | ||
toLab(): Magicolor<'lab'>; | ||
to(type: ColorType): Magicolor<"rgb"> | Magicolor<"hex"> | Magicolor<"hsl"> | Magicolor<"hsb"> | Magicolor<"lab">; | ||
to(type: ColorType): Magicolor<"hex"> | Magicolor<"rgb"> | Magicolor<"hsl"> | Magicolor<"hsb"> | Magicolor<"lab">; | ||
hex(): string; | ||
@@ -195,0 +201,0 @@ rgb(round?: boolean): RgbColor; |
{ | ||
"name": "magic-color", | ||
"type": "module", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Magic color creator.", | ||
@@ -41,4 +41,4 @@ "author": "Chris <hizyyv@gmail.com>", | ||
"dependencies": { | ||
"chroma-js": "^2.4.2", | ||
"@magic-color/core": "1.2.1" | ||
"chroma-js": "^2.6.0", | ||
"@magic-color/core": "1.2.2" | ||
}, | ||
@@ -45,0 +45,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
94754
7155
1
+ Added@magic-color/core@1.2.2(transitive)
- Removed@magic-color/core@1.2.1(transitive)
Updated@magic-color/core@1.2.2
Updatedchroma-js@^2.6.0