New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

with-alpha-hex

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

with-alpha-hex - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

lib/index.d.ts
/**
* adds given alpha value to a css hex color.
* change/add alpha(opacity) of a css hexadecimal color.
*

@@ -4,0 +4,0 @@ * @example

@@ -9,3 +9,3 @@ "use strict";

/**
* adds given alpha value to a css hex color.
* change/add alpha(opacity) of a css hexadecimal color.
*

@@ -12,0 +12,0 @@ * @example

{
"name": "with-alpha-hex",
"version": "1.0.2",
"version": "1.0.3",
"description": "A tiny TypeScript/JavaScript library which helps change/add alpha(opacity) of a css hexadecimal color.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -10,2 +10,6 @@ # with-alpha-hex

## Installation
`npm i with-alpha-hex` or `yarn add with-alpha-hex`
## Helps what? / Why / When to use / Features

@@ -18,5 +22,5 @@

## Installation
## A 8-digit css hexadecimal color sample
`npm i with-alpha-hex` or `yarn add with-alpha-hex`
![alpha-sample](https://user-images.githubusercontent.com/46079709/95020082-ee288180-06a3-11eb-822c-eab34d01d5be.png)

@@ -30,8 +34,11 @@ ## Usage

const weakTextColor = withAlphaHex(textColor, 0.4)
const weakTextColor = withAlphaHex(textColor, 0.4) // #00000066
console.log(weakTextColor) // #00000066
const primaryColor = '#14B1AB'
const weakPrimaryColor = withAlphaHex(primaryColor, 0.2) // #14B1AB33
```
## Styled-JSX Example
```tsx

@@ -38,0 +45,0 @@ import { withAlphaHex } from 'with-alpha-hex'

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