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

@magic-color/core

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magic-color/core - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

132

dist/index.d.ts
/**
* 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

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