simple-hex-to-rgb

Provides a function that converts hex colors to RGB and vice versa

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
simple-hex-to-rgb
1.0.05 years ago5 years agoMinified + gzip package size for simple-hex-to-rgb in KB

Readme

simple-hex-to-rgb
Provides a function that converts hex colors to RGB and vice versa

Usage

First, install the package using npm:
npm install simple-hex-to-rgb --save
Then, require the package and use it like so:
const convert = require('simple-hex-to-rgb');

console.log(convert("#2f27ab")); // rgb(47, 39, 171)
console.log(convert("rgb(47, 39, 171)")); // #2f27ab

License

MIT