D3.js | d3.color() Function
The d3.color() function in D3.js is used to parse the specified CSS color used as parameter of the function and return RGB or HSL color. If specifier is not given, then null is returned. Syntax: d3.color(color); Parameters: This function accepts single parameter color which specifies the CSS color.