generate-rgb
v1.1.0
Published
Generate an RGB color string
Downloads
2
Maintainers
Readme
generate-rgb
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