Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hex-rgba

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hex-rgba - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

yarn.lock

2

index.js
'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
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc