Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

magic-color

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magic-color - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

33

dist/index.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc