@magic-color/core
Advanced tools
Comparing version 1.2.2 to 1.3.0
/** | ||
* Magicolor includes colors basiclly from chroma.js, really from colorbrewer2.org. | ||
* | ||
* @Credit to [@gka](https://github.com/gka/chroma.js) | ||
* | ||
* @see https://github.com/gka/chroma.js | ||
*/ | ||
declare const colorbrewer: Record<string, string[]>; | ||
/** | ||
* [0-360, 0-100, 0-100] | ||
@@ -45,59 +54,2 @@ */ | ||
declare function isHex(color: string): boolean; | ||
declare function parseHex(color: HexColor): { | ||
values: string; | ||
alpha: number; | ||
}; | ||
declare function hexToRgb(color: HexColor): RgbColor; | ||
declare function hexToHsl(color: HexColor): HslColor; | ||
declare function hexToHsb(color: HexColor): HsbColor; | ||
declare function hexToLab(color: HexColor): LabColor; | ||
declare function toHex(c: number): string; | ||
declare function isHsl(color: string): boolean; | ||
declare function parseHsl(color: string): { | ||
values: HslColor; | ||
alpha: number; | ||
}; | ||
declare function hslToHex(color: HslColor): HexColor; | ||
declare function hslToRgb(color: HslColor): RgbColor; | ||
declare function hslToHsb(color: HslColor): HsbColor; | ||
declare function hslToLab(color: HslColor): LabColor; | ||
declare function isHsb(color: string): boolean; | ||
declare function parseHsb(color: string): { | ||
values: HsbColor; | ||
alpha: number; | ||
}; | ||
declare function hsbToHex(color: HsbColor): string; | ||
declare function hsbToRgb(color: HsbColor): RgbColor; | ||
declare function hsbToHsl(color: HsbColor): HslColor; | ||
declare function hsbToLab(color: HsbColor): LabColor; | ||
declare function isRgb(color: string): boolean; | ||
declare function parseRgb(color: string): { | ||
values: RgbColor; | ||
alpha: number; | ||
}; | ||
declare function rgbToHex(color: RgbColor): HexColor; | ||
declare function rgbToHsl(color: RgbColor): HslColor; | ||
declare function rgbToHsb(color: RgbColor): HsbColor; | ||
declare function rgbToLab(color: RgbColor): LabColor; | ||
declare function isKeyword(color: string): boolean; | ||
declare function parseKeyword(color: string): { | ||
values: string; | ||
alpha: number; | ||
} | undefined; | ||
declare function isLab(color: string): boolean; | ||
declare function parseLab(color: string): { | ||
values: LabColor; | ||
alpha: number; | ||
}; | ||
declare function labToRgb(color: LabColor): RgbColor; | ||
declare function labToHex(color: LabColor): HexColor; | ||
declare function labToHsl(color: LabColor): HslColor; | ||
declare function labToHsb(color: LabColor): HsbColor; | ||
declare const unoColors: { | ||
@@ -454,11 +406,2 @@ inherit: string; | ||
/** | ||
* Magicolor includes colors basiclly from chroma.js, really from colorbrewer2.org. | ||
* | ||
* @Credit to [@gka](https://github.com/gka/chroma.js) | ||
* | ||
* @see https://github.com/gka/chroma.js | ||
*/ | ||
declare const colorbrewer: Record<string, string[]>; | ||
/** | ||
* X11 color names | ||
@@ -626,2 +569,59 @@ * | ||
declare function isHex(color: string): boolean; | ||
declare function parseHex(color: HexColor): { | ||
values: string; | ||
alpha: number; | ||
}; | ||
declare function hexToRgb(color: HexColor): RgbColor; | ||
declare function hexToHsl(color: HexColor): HslColor; | ||
declare function hexToHsb(color: HexColor): HsbColor; | ||
declare function hexToLab(color: HexColor): LabColor; | ||
declare function toHex(c: number): string; | ||
declare function isHsb(color: string): boolean; | ||
declare function parseHsb(color: string): { | ||
values: HsbColor; | ||
alpha: number; | ||
}; | ||
declare function hsbToHex(color: HsbColor): string; | ||
declare function hsbToRgb(color: HsbColor): RgbColor; | ||
declare function hsbToHsl(color: HsbColor): HslColor; | ||
declare function hsbToLab(color: HsbColor): LabColor; | ||
declare function isHsl(color: string): boolean; | ||
declare function parseHsl(color: string): { | ||
values: HslColor; | ||
alpha: number; | ||
}; | ||
declare function hslToHex(color: HslColor): HexColor; | ||
declare function hslToRgb(color: HslColor): RgbColor; | ||
declare function hslToHsb(color: HslColor): HsbColor; | ||
declare function hslToLab(color: HslColor): LabColor; | ||
declare function isKeyword(color: string): boolean; | ||
declare function parseKeyword(color: string): { | ||
values: string; | ||
alpha: number; | ||
} | undefined; | ||
declare function isLab(color: string): boolean; | ||
declare function parseLab(color: string): { | ||
values: LabColor; | ||
alpha: number; | ||
}; | ||
declare function labToRgb(color: LabColor): RgbColor; | ||
declare function labToHex(color: LabColor): HexColor; | ||
declare function labToHsl(color: LabColor): HslColor; | ||
declare function labToHsb(color: LabColor): HsbColor; | ||
declare function isRgb(color: string): boolean; | ||
declare function parseRgb(color: string): { | ||
values: RgbColor; | ||
alpha: number; | ||
}; | ||
declare function rgbToHex(color: RgbColor): HexColor; | ||
declare function rgbToHsl(color: RgbColor): HslColor; | ||
declare function rgbToHsb(color: RgbColor): HsbColor; | ||
declare function rgbToLab(color: RgbColor): LabColor; | ||
declare function isObject(v: unknown): boolean; | ||
@@ -628,0 +628,0 @@ declare function isArray(v: unknown): v is any[]; |
{ | ||
"name": "@magic-color/core", | ||
"type": "module", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "Magic color core library", | ||
@@ -6,0 +6,0 @@ "author": "Chris <hizyyv@gmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
0
56549