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

magic-color

Package Overview
Dependencies
Maintainers
1
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 0.0.2 to 0.0.3

21

dist/index.d.ts

@@ -29,2 +29,15 @@ type ColorType = 'hsl' | 'hsb' | 'rgb' | 'hex';

interface ThemeMetas {
'50': string;
'100': string;
'200': string;
'300': string;
'400': string;
'500': string;
'600': string;
'700': string;
'800': string;
'900': string;
'950': string;
}
interface ThemeOptions {

@@ -43,3 +56,3 @@ /**

*/
render?: (meta: [string, string]) => [string, string];
render?: (meta: [keyof ThemeMetas, string]) => [string, string];
}

@@ -70,6 +83,6 @@ /**

* @param options ThemeOptions
* @returns Record<string, string>
* @returns ThemeMetas
*/
declare function theme(color: string, options?: ThemeOptions): Record<string, string>;
declare function theme(color: string, options?: ThemeOptions): ThemeMetas;
export { type ColorType, type ThemeOptions, convertColor, getColorType, hexToHsb, hexToHsl, hexToRgb, hsbToHex, hsbToHsl, hsbToRgb, hslToHex, hslToHsb, hslToRgb, isColor, isHex, isHsb, isHsl, isRgb, rgbToHex, rgbToHsb, rgbToHsl, theme };
export { type ColorType, type ThemeMetas, type ThemeOptions, convertColor, getColorType, hexToHsb, hexToHsl, hexToRgb, hsbToHex, hsbToHsl, hsbToRgb, hslToHex, hslToHsb, hslToRgb, isColor, isHex, isHsb, isHsl, isRgb, rgbToHex, rgbToHsb, rgbToHsl, theme };

2

package.json
{
"name": "magic-color",
"type": "module",
"version": "0.0.2",
"version": "0.0.3",
"packageManager": "pnpm@8.14.0",

@@ -6,0 +6,0 @@ "description": "Magic color creator.",

@@ -7,2 +7,8 @@ <img src="https://raw.githubusercontent.com/zyyv/magic-color/main/public/logo.svg" style="width:100px;" />

## Features
- 🎨 Convert between RGB, HEX, HSL and HSB.
- 🦄 Theme color generator.
- etc.
## Usage

@@ -22,3 +28,3 @@

hexTorgb('#fff') // [255, 255, 255]
rgbTohex(255, 255, 255) // '#fff'
rgbTohex('rgb(255, 255, 255)') // '#fff'
```

@@ -25,0 +31,0 @@

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