npm.io
4.1.2 • Published 7 years ago

int-to-rgb-x

Licence
MIT
Version
4.1.2
Deps
2
Size
250 kB
Vulns
0
Weekly
0
Stars
1

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

int-to-rgb-x

Convert an integer to a RGB string.

module.exports(i)string

Takes a number between 0 and 16777215 inclusive and converts it into 6 digit RGB notation.

Kind: Exported function
Returns: string - The RGB hexadecimal notation: "#RRGGBB".

Param Type Description
i number Integer to be converted into 6 digit RGB.

Example

import intToRGB from 'int-to-rgb-x';

console.log(intToRGB(1)); // "#000001"

Keywords