node-rgb-to-hex

0.0.1 • Public • Published

Convert RGB to HEX

🦄 Simple utility to convert RGB Values to HEX color codes

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-rgb-to-hex --save

(or)

Install with Yarn:

yarn add node-rgb-to-hex

🖊️ Usage

Import the module in your project:

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

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

💡 Example

Pass the RGB value to the function

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

const hex = rgbToHex(255, 255, 255)
console.log(hex);

☑️ Example Output

#ffffff

💚 Message

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

/node-rgb-to-hex/

    Package Sidebar

    Install

    npm i node-rgb-to-hex

    Weekly Downloads

    1

    Version

    0.0.1

    License

    ISC

    Unpacked Size

    37.5 kB

    Total Files

    6

    Last publish

    Collaborators

    • mcnaveen