1.2.0 • Published 12 months ago

@samscodz/randhexcolor v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

Random hex color

This package returns a random hex color. It's pretty convenient to use.

Example usage:

const random = require('@samscodz/randhexcolor')
const hex = random()
console.log(hex)

Boom! The random hex is now created.

The code above will return this:

{
  hex: "#47883C",
  rgb: "rgb(71, 136, 60)"
}

To just get the hex or the rgb or the cmyk, use this:

const random = require('@samscodz/randhexcolor')
const hex = random("hex")
const rgb = random("rgb")
const cmyk = random("cmyk")
console.log(hex) // for hex
console.log(rgb) // for rgb
console.log(cmyk) // for cmyk, will return array

^ For different results

or

const random = require('@samscodz/randhexcolor')
const hex = random()
console.log(hex.hex) // for hex
console.log(hex.rgb) // for rgb
console.log(hex.cmyk) // for cmyk

^ For exact result

Pretty convenient, right? Use this package now!

1.2.0

12 months ago

1.1.2

12 months ago

1.1.1

12 months ago

1.1.0

12 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago