with-alpha-hex
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "with-alpha-hex", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"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", |
@@ -19,5 +19,16 @@ # with-alpha-hex | ||
`npm i with-alpha-hex` or `yarn add with-alpha-hex` | ||
## Usage | ||
```ts | ||
import { withAlphaHex } from 'with-alpha-hex' | ||
const textColor = '#000' | ||
const weakTextColor = withAlphaHex(textColor, 0.4) | ||
console.log(weakTextColor) // #00000066 | ||
``` | ||
## Styled-JSX Example | ||
@@ -24,0 +35,0 @@ ```tsx |
8822
61