1.0.0 • Published 6 months ago

string-to-rgba-to-string v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

string-to-rgba-to-string

The code provides a Node.js module that offers functions for bidirectional conversion between hexadecimal color representations and RGBA representations. It includes methods to convert a predefined color name to RGBA and vice versa. Useful for manipulating colors in Node.js applications.

Install

$ npm install string-to-rgba-to-string

Usage

const color = require("./index.js");

console.log(color.convertToRgba('green'));
//=> 'rgba(0, 128, 0, 1)'

console.log(color.convertToString('rgba(255, 0, 0, 1)'));
//=> 'red'

GitHub

npm

1.0.0

6 months ago