Socket
Socket
Sign inDemoInstall

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

For generating attractive random colors


Version published
Weekly downloads
112K
decreased by-19.05%
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

FAQs

Package last updated on 04 Apr 2016

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc