magic-color
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -165,2 +165,6 @@ import { ColorType, Colors, Opacity, RgbColor, HslColor, HsbColor, LabColor } from '@magic-color/core'; | ||
declare function random(type?: ColorType): string; | ||
declare function valid(color: string): boolean; | ||
interface ColorObject<T extends ColorType> { | ||
@@ -209,17 +213,18 @@ type: T; | ||
} | ||
declare function mc<T extends ColorType>(value: Colors[T] | Record<string, number>, type?: T, alpha?: Opacity): Magicolor<T>; | ||
declare function mc<T extends ColorType = 'rgb'>(v1: number, v2: number, v3: number, type?: T, alpha?: Opacity): Magicolor<T>; | ||
declare namespace mc { | ||
var valid: (color: string) => boolean; | ||
var random: (type?: ColorType) => string; | ||
var hash: typeof hash; | ||
var theme: typeof theme; | ||
var getColorName: typeof getColorName; | ||
var wcag: typeof calcWCAG; | ||
var apca: typeof calcAPCA; | ||
var apcaReverse: typeof reverseAPCA; | ||
var readable: typeof getReadableTextColor; | ||
var warm: typeof isWarmColor; | ||
interface MagicolorInstance { | ||
<T extends ColorType>(value: Colors[T] | Record<string, number>, type?: T, alpha?: Opacity): Magicolor<T>; | ||
<T extends ColorType = 'rgb'>(v1: number, v2: number, v3: number, type?: T, alpha?: Opacity): Magicolor<T>; | ||
valid: typeof valid; | ||
random: typeof random; | ||
hash: typeof hash; | ||
theme: typeof theme; | ||
getColorName: typeof getColorName; | ||
wcag: typeof calcWCAG; | ||
apca: typeof calcAPCA; | ||
apcaReverse: typeof reverseAPCA; | ||
readable: typeof getReadableTextColor; | ||
warm: typeof isWarmColor; | ||
} | ||
declare const mc: MagicolorInstance; | ||
export { type BasicColorShades, type ClosestColorShades, type ColorObject, Magicolor, type ThemeMetas, type ThemeOptions, mc }; | ||
export { type BasicColorShades, type ClosestColorShades, type ColorObject, Magicolor, type ThemeMetas, type ThemeOptions, calcAPCA, calcWCAG, getColorName, getReadableTextColor, hash, isWarmColor, mc, random, reverseAPCA, theme }; |
{ | ||
"name": "magic-color", | ||
"type": "module", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Magic color creator.", | ||
@@ -42,3 +42,3 @@ "author": "Chris <hizyyv@gmail.com>", | ||
"chroma-js": "^2.4.2", | ||
"@magic-color/core": "1.1.2" | ||
"@magic-color/core": "1.2.0" | ||
}, | ||
@@ -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
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
94432
7149
+ Added@magic-color/core@1.2.0(transitive)
- Removed@magic-color/core@1.1.2(transitive)
Updated@magic-color/core@1.2.0