d3.rgb()

d3.rgb(r, g, b[, opacity])
d3.rgb(specifier)
d3.rgb(color)

Constructs a new RGB color. The channel values are exposed as r, g and b properties on the returned instance. Use the RGB color picker to explore this color space.

If r, g and b are specified, these represent the channel values of the returned color; an opacity may also be specified. If a CSS Color Module Level 3 specifier string is specified, it is parsed and then converted to the RGB color space. See color for examples. If a color instance is specified, it is converted to the RGB color space using color.rgb. Note that unlike color.rgb this method always returns a new instance, even if color is already an RGB color.

doc_D3_Js
2016-11-24 10:27:06
Comments
Leave a Comment

Please login to continue.