MCPcopy Create free account
hub / github.com/breck7/scroll / rgbConvert

Function rgbConvert

external/.d3.js:3129–3134  ·  view source on GitHub ↗
(o)

Source from the content-addressed store, hash-verified

3127}
3128
3129function rgbConvert(o) {
3130 if (!(o instanceof Color)) o = color(o);
3131 if (!o) return new Rgb;
3132 o = o.rgb();
3133 return new Rgb(o.r, o.g, o.b, o.opacity);
3134}
3135
3136function rgb(r, g, b, opacity) {
3137 return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);

Callers 3

rgbFunction · 0.85
labConvertFunction · 0.85
cubehelixConvertFunction · 0.85

Calls 1

colorFunction · 0.85

Tested by

no test coverage detected