ewc-color
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

🎨 EWC Color

NPM version NPM downloads Build status Dependencies Coverage Status

Convert a Hex string to an ABGR number. Useful for ewc.

💾 Installation

The package is on the NPM registry as ewc-color. Simply install it with your NPM client of choice.

🔧 Usage

First, import the module:

const { convert } = require('ewc-color')

convert() takes a hex string in short (#fff), RGB (#ffffff) or RGBA (#ffffff20) forms and returns an ABGR color represented as a decimal number.

📝 Example

// Import the module
const { convert } = require('ewc-color')
 
const color = convert('#fff')
// -> 0x20ffffff

Package Sidebar

Install

npm i ewc-color

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

7.51 kB

Total Files

13

Last publish

Collaborators

  • lolpants