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"