npm.io
1.0.0 • Published 10 years ago

int-to-rgb

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
2

int-to-rgb

This module takes a number between 0 and 16777215 inclusive and converts it into an rgb object.

Install

npm install int-to-rgb

Usage

var intToRGB = require('int-to-rgb');
var rgb = intToRGB(2763306);
console.log(rgb)
/*
{
  red: 42,
  green: 42,
  blue: 42
}
*/