node-hex-to-rgb

0.0.1 • Public • Published

Convert HEX to RGB

🦄 Simple utility to convert HEX color codes to RGB Values

Build

Extract Email Domain Name

📦 Requirements

Node.js 12.x LTS or 14.x LTS

Installation

Install the NPM Package with the below command:

npm install node-hex-to-rgb --save

(or)

Install with Yarn:

yarn add node-hex-to-rgb

🖊️ Usage

Import the module in your project:

// Commonjs Import
var hexToRGB = require("node-hex-to-rgb");

// or ES6 import
import hexToRGB from "node-hex-to-rgb";

💡 Example

Pass the RGB value to the function

import hexToRGB from "node-hex-to-rgb";

const rgb = hexToRGB("#ff0000");
console.log(rgb);

☑️ Example Output

[ { red: 255, green: 0, blue: 0 } ]

💚 Message

I hope you find this useful. If you have any questions, please create an issue.

/node-hex-to-rgb/

    Package Sidebar

    Install

    npm i node-hex-to-rgb

    Weekly Downloads

    0

    Version

    0.0.1

    License

    ISC

    Unpacked Size

    36.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • mcnaveen