0.4.2 • Published 2 years ago

hex-color-opacity v0.4.2

Weekly downloads
48
License
MIT
Repository
github
Last release
2 years ago

npm.io

Install

npm i hex-color-opacity

Usage

const opacity = require('hex-color-opacity')

opacity('#FFFFFF', 0.5)

Documentation

Adding opacity to hexadecimal color values

To add opacity to a hex color simply pass the color value (this includes the # character) and the desired opacity as a number value between 0 and 1 to the opacity function. The resulting hex value is returned. Support for 3 value hex colors is provided out of the box. All hex values are returned in upper case.

For example:

opacity('#FFF', 0.5) // #FFFFFF80

Contributing

Contributors are welcome, feel free to submit a new pull request to help improve hex-color-opacity.

0.4.1

2 years ago

0.4.0

2 years ago

0.4.2

2 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.1.2

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago