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

extract-colors

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extract-colors - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

2

package.json
{
"name": "extract-colors",
"version": "1.1.2",
"version": "1.1.3",
"description": "Extract color palettes from images",

@@ -5,0 +5,0 @@ "main": "dist/extract-colors.cjs.js",

# Extract Colors
Extract color palettes from images.
Simple use, <5ko minified and no dependencies for browser. Dependency to canvas for node.js
Extract color palettes from images.
Simple use, < 5ko minified, fast process and no dependencies for browser.
Dependency to canvas for node.js
![3 examples of colors extraction](./doc/colors.jpg)

@@ -12,3 +14,3 @@ ## Install

```bash
npm install 'extract-colors'
npm install extract-colors
```

@@ -21,3 +23,3 @@

```bash
npm install 'extract-colors' 'canvas'
npm install extract-colors canvas
```

@@ -46,5 +48,5 @@

const src = './my-image.jpg'
const src = path.join(__dirname, './my-image.jpg')
extractColors(path.join(__dirname, src))
extractColors(src)
.then(console.log)

@@ -68,3 +70,5 @@ .catch(console.log)

extractColors(src, options).then(console.log)
extractColors(src, options)
.then(console.log)
.catch(console.error)
```

@@ -78,3 +82,3 @@

**distance**
_From 0 to 1 is the color distance to not have near colors (1 distance is between White and Black)_
_From 0 to 1 is the color distance to not have near colors (1 distance is between white and black)_
Type: `Number`

@@ -84,3 +88,3 @@ Default: `0.2`

**saturationImportance**
_Power of the saturation weight during the process (0 is not used, 1 is equal only saturaton and not area size)_
_Power of the saturation weight during the process (0 is not used, 1 is only saturation and not area size)_
Type: `Number`

@@ -87,0 +91,0 @@ Default: `0.2`

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