Socket
Book a DemoInstallSign in
Socket

randomcolor

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

randomcolor

A tiny script for generating attractive random colors

latest
Source
npmnpm
Version
0.6.2
Version published
Weekly downloads
184K
-3.79%
Maintainers
1
Weekly downloads
 
Created

What is randomcolor?

The randomcolor npm package is a versatile tool for generating random colors. It allows users to create random colors with various options for hue, luminosity, and format.

What are randomcolor's main functionalities?

Generate a random color

This feature generates a completely random color in hexadecimal format.

const randomColor = require('randomcolor');
const color = randomColor();
console.log(color);

Generate a random color with specific hue

This feature generates a random color with a specified hue, in this case, blue.

const randomColor = require('randomcolor');
const color = randomColor({ hue: 'blue' });
console.log(color);

Generate a random color with specific luminosity

This feature generates a random color with a specified luminosity, in this case, light.

const randomColor = require('randomcolor');
const color = randomColor({ luminosity: 'light' });
console.log(color);

Generate a random color with specific format

This feature generates a random color in a specified format, in this case, RGB.

const randomColor = require('randomcolor');
const color = randomColor({ format: 'rgb' });
console.log(color);

Generate multiple random colors

This feature generates an array of multiple random colors, in this case, five colors.

const randomColor = require('randomcolor');
const colors = randomColor({ count: 5 });
console.log(colors);

Other packages similar to randomcolor

Keywords

attractive

FAQs

Package last updated on 14 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts