MCPcopy Create free account
hub / github.com/outerbase/studio / generateGradientColors

Function generateGradientColors

src/components/chart/echart-options-builder.ts:473–484  ·  view source on GitHub ↗
(
  startColor: string,
  endColor: string,
  numColors: number
)

Source from the content-addressed store, hash-verified

471}
472
473export function generateGradientColors(
474 startColor: string,
475 endColor: string,
476 numColors: number
477): string[] {
478 const colors = [];
479 for (let i = 0; i < numColors; i++) {
480 const factor = i / (numColors - 1);
481 colors.push(interpolateColor(startColor, endColor, factor));
482 }
483 return colors;
484}

Callers 5

ChartSeriesFunction · 0.90
EditChartMenuFunction · 0.90
getColorRangeMethod · 0.85
getAxisKeyColorsMethod · 0.85

Calls 1

interpolateColorFunction · 0.85

Tested by

no test coverage detected