You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

colord

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0 to 2.4.0

plugins/harmonies.d.ts

4

CHANGELOG.md

@@ -0,1 +1,5 @@

### 2.4.0
- New plugin: Color harmonies generator ❤️ [@EricRovell](https://github.com/EricRovell)
### 2.3.0

@@ -2,0 +6,0 @@

{
"name": "colord",
"version": "2.3.0",
"version": "2.4.0",
"description": "👑 A tiny yet powerful tool for high-performance color manipulations and conversions",

@@ -22,3 +22,4 @@ "keywords": [

"cmyk",
"mix"
"mix",
"harmonies"
],

@@ -47,2 +48,7 @@ "repository": "omgovich/colord",

},
"./plugins/harmonies": {
"import": "./plugins/harmonies.mjs",
"require": "./plugins/harmonies.js",
"default": "./plugins/harmonies.mjs"
},
"./plugins/hwb": {

@@ -156,2 +162,6 @@ "import": "./plugins/hwb.mjs",

{
"path": "dist/plugins/harmonies.mjs",
"limit": "0.5 KB"
},
{
"path": "dist/plugins/hwb.mjs",

@@ -158,0 +168,0 @@ "limit": "1 KB"

@@ -504,2 +504,24 @@ <div align="center">

<details>
<summary><b><code>.harmonies(type = "complementary")</code></b> (<b>harmonies</b> plugin)</summary>
Provides functionality to generate [harmony colors](<https://en.wikipedia.org/wiki/Harmony_(color)>). Returns an array of `Colord` instances.
```js
import { colord, extends } from "colord";
import harmoniesPlugin from "colord/plugins/harmonies";
extend([harmoniesPlugin]);
const color = colord("#ff0000");
color.harmonies("analogous").map((c) => c.toHex()); // ["#ff0080", "#ff0000", "#ff8000"]
color.harmonies("complementary").map((c) => c.toHex()); // ["#ff0000", "#00ffff"]
color.harmonies("rectangle").map((c) => c.toHex()); // ["#ff0000", "#ffff00", "#00ffff", "#0000ff"]
color.harmonies("split-complementary").map((c) => c.toHex()); // ["#ff0000", "#00ff80", "#0080ff"]
color.harmonies("tetradic").map((c) => c.toHex()); // ["#ff0000", "#80ff00", "#00ffff", "#8000ff"]
color.harmonies("triadic").map((c) => c.toHex()); // ["#ff0000", "#00ff00", "#0000ff"]
```
</details>
### Color analysis

@@ -710,2 +732,24 @@

<details>
<summary><b><code>harmonies</code> (Color harmonies)</b> <i>0.15 KB</i></summary>
Provides functionality to generate [harmony colors](<https://en.wikipedia.org/wiki/Harmony_(color)>).
```js
import { colord, extends } from "colord";
import harmonies from "colord/plugins/harmonies";
extend([harmonies]);
const color = colord("#ff0000");
color.harmonies("analogous").map((c) => c.toHex()); // ["#ff0080", "#ff0000", "#ff8000"]
color.harmonies("complementary").map((c) => c.toHex()); // ["#ff0000", "#00ffff"]
color.harmonies("rectangle").map((c) => c.toHex()); // ["#ff0000", "#ffff00", "#00ffff", "#0000ff"]
color.harmonies("split-complementary").map((c) => c.toHex()); // ["#ff0000", "#00ff80", "#0080ff"]
color.harmonies("tetradic").map((c) => c.toHex()); // ["#ff0000", "#80ff00", "#00ffff", "#8000ff"]
color.harmonies("triadic").map((c) => c.toHex()); // ["#ff0000", "#00ff00", "#0000ff"]
```
</details>
<details>
<summary><b><code>hwb</code> (HWB color model)</b> <i>0.8 KB</i></summary>

@@ -712,0 +756,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc