hex_a-to-rgba

convert color codes easily between rgb and hex

Usage no npm install needed!

<script type="module">
  import hexAToRgba from 'https://cdn.skypack.dev/hex_a-to-rgba';
</script>

README

npm version

hex_a-to-rgba

How To Use:

First require the package:

$ const convertColor = require("hex_a-to-rgba");

Then call the function with a value:

convertColor ('');   // Will return an error message

convertColor ('#000000');   / will return rgb(0,0,0)

convertColor ('( 255,255,255,.5)') / will return #ffffff80

NPM Package at: https://www.npmjs.com/package/hex_a-to-rgba
Contribute to the project or fork it if you like ! :)
Have fun. XD