Comparing version 1.0.0 to 1.0.1
'use strict'; | ||
module.exports = function hexToRgba(hex, opacity){ | ||
module.exports = function hexToRgba(hex, opacity) { | ||
var opacity = opacity || 100; | ||
@@ -5,0 +5,0 @@ var hex = hex.replace('#', ''); |
{ | ||
"name": "hex-rgba", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Convert HEX to RGBA", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,10 +6,24 @@ # HEX to RGBA | ||
## Installation | ||
```bash | ||
npm install --save hex-rgba | ||
``` | ||
or | ||
```bash | ||
yarn add hex-rgba | ||
``` | ||
npm install --save hex-rgba | ||
## Usage | ||
```js | ||
const hexToRgba = require('hex-rgba'); | ||
const rgba = hexToRgba('#1B2B34', 40); | ||
// rgba will return rgba(27, 43 ,52, 0.4) | ||
``` | ||
var hexToRgba = require('hex-rgba'); | ||
var rgba = hexToRgba('#1B2B34', 40); | ||
// rgba return rgba(27, 43 ,52, 0.4) | ||
## Test | ||
```bash | ||
npm test | ||
``` | ||
or | ||
```bash | ||
yarn test | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2700
6
28