An open API service indexing awesome lists of open source software.

https://github.com/anshsinghsonkhia/complimentary-color

Get the complementary color to any given color. <We Welcome Contributions for Hacktoberfest 2024>
https://github.com/anshsinghsonkhia/complimentary-color

color hacktoberfest hacktoberfest-accepted hacktoberfest2024 npm-package npmjs

Last synced: 3 months ago
JSON representation

Get the complementary color to any given color. <We Welcome Contributions for Hacktoberfest 2024>

Awesome Lists containing this project

README

          

# complimentary-color
Get the complementary color to any given color.


# Installation

```shell
npm i complimentary-color
```

> for modern JavaScript projects using ESM:

```js
import compliColor from 'complimentary-color';
```

> Using traditional method for Node.js projects that follow the CommonJS module system:

```js
const compliColor = require('complimentary-color');
```

# Usage

- Get Complimentary Color in RGB

```js
console.log(compliColor.process("rgb(113,256,228)"));
// returns - rgb(256,113,141)
```

- Get Complimentary Color in HSL

```js
console.log(compliColor.process("hsl(120,50%,50%)"));
// returns - hsl(300,50.00%,50.00%)
```

- Get Complimentary Color in HEX

```js
console.log(compliColor.process("#ff00ff"));
// returns - #00ff0
```