alpha-to-hex

2.0.0 • Public • Published

convert alpha values between 0 to 100 into hex codes like #ff

Install

$ npm install alpha-to-hex

Usage

var alpha_hex = require('alpha-to-hex');

console.log(alpha_hex.convert(["0",100])); // as a Array

output : [ #00 , #ff ]

or

console.log(alpha_hex.convert("0","12","99")); // as a String

output : [ #00 , #8c , #fc]

Package Sidebar

Install

npm i alpha-to-hex

Weekly Downloads

1

Version

2.0.0

License

ISC

Last publish

Collaborators

  • surajrawat