MCPcopy Index your code
hub / github.com/plotly/plotly.js / _arrayToColor

Function _arrayToColor

src/traces/scatter3d/convert.js:330–346  ·  view source on GitHub ↗
(color)

Source from the content-addressed store, hash-verified

328}
329
330function _arrayToColor(color) {
331 if (Lib.isArrayOrTypedArray(color)) {
332 var c = color[0];
333
334 if (Lib.isArrayOrTypedArray(c)) color = c;
335
336 return (
337 'rgb(' +
338 color.slice(0, 3).map(function (x) {
339 return Math.round(x * 255);
340 }) +
341 ')'
342 );
343 }
344
345 return null;
346}
347
348function arrayToColor(colors) {
349 if (!Lib.isArrayOrTypedArray(colors)) {

Callers 1

arrayToColorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…