1.3.1 • Published 9 months ago

node-getcolor v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

GetColor

Advantages:

  • Huge data HEX and RGB colors
  • Simple and fast interaction
  • Small size packet NPM

Installing:

  • Using npm:

    npm i node-getcolor

  • Connect this module in code, indicate module

    const colors = require('node-getcolor');

How to write random color selection?

const colors = require('node-getcolor');
const randomColor = colors.getRandomColor();

// Get name of color
console.log(randomColor.name);
// Console: celadon


// You can get code of color
console.log(randomColor.code);
// Console: #7fffd4


// Or all data
console.log(`Name: ${randomColor.name} | Code: ${randomColor.code}`);
// Console: Name: aquamarine | Code: #7fffd4

How to choose a specific color?

const colors = require('node-getcolor');

// Color name must be written in lower case
console.log(colors.getHexColor('lime'));
// Console: #7fffd4

// You can get name of color by HEX-code
console.log(colors.getNameColor('#ffffff'));
// Console: White

// Get color in RGB format
console.log(colors.getRGBColor('red'));
// Console: [ 255, 0, 0, 1 ]

Usage example:

Telegram

Donate link | My GitHub | NPM

Readme Card

1.3.1

9 months ago

1.3.0

9 months ago

1.2.9

9 months ago

1.2.8

9 months ago

1.2.6

9 months ago

1.2.5

9 months ago

1.2.4

9 months ago

1.2.3

9 months ago

1.2.2

9 months ago

1.2.1

9 months ago

1.2.0

9 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.9

9 months ago