color_name_to_rgb
converts an html color name to a format of your choice
Installation
npm install color_name_converter
Usage
First you require the library:
var color = ;
Invoking is easy. You just write:
var output = ;
The output will be:
var output = 'rgb(255,215,0)';
As a default the function returns a rgb string. But you can define your format too:
var output = ; // output = ''#ffd700''; var output = ; // output 'rgb(255,215,0,1 )' var output = ; // output [255, 215, 0, 1]
Valid formats are rgb, rgba, hex, array, object