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

Package Sidebar

Install

npm i generate-rgb

Weekly Downloads

5

Version

1.1.0

License

MIT

Last publish

Collaborators

  • arthurvr