int-to-rgb-x

4.1.2 • Public • Published

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"

Package Sidebar

Install

npm i int-to-rgb-x

Weekly Downloads

1

Version

4.1.2

License

MIT

Unpacked Size

256 kB

Total Files

11

Last publish

Collaborators

  • xotic750