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>
- Host: GitHub
- URL: https://github.com/anshsinghsonkhia/complimentary-color
- Owner: AnshSinghSonkhia
- License: apache-2.0
- Created: 2024-03-11T06:19:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-11T06:31:23.000Z (over 1 year ago)
- Last Synced: 2025-03-11T00:08:00.968Z (7 months ago)
- Topics: color, hacktoberfest, hacktoberfest-accepted, hacktoberfest2024, npm-package, npmjs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/complimentary-color
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```