npm

Need private packages and team management tools?Check out npm Orgs. »

generate-rgb

1.1.0 • Public • Published

generate-rgb Build Status

Generate an RGB color string

Install

$ npm install --save generate-rgb

Usage

var generateRgb = require('generate-rgb');
 
generateRgb(0, 255, 255);
//=> 'rgb(0, 255, 255)'
 
generateRgb({
    red: 0,
    green: 255,
    blue: 255
});
//=> 'rgb(0, 255, 255)'

API

generateRgb(red, green, blue)

red

required

type: number

A number between 0 and 255 which represents the amount of red.

green

required

type: number

A number between 0 and 255 which represents the amount of green.

blue

required

type: number

A number between 0 and 255 which represents the amount of blue.

Related

License

MIT © Arthur Verschaeve

install

npm i generate-rgb

Downloadsweekly downloads

4

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability