MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / parseSeriesColorToRgba01

Function parseSeriesColorToRgba01

src/renderers/createScatterRenderer.ts:41–42  ·  view source on GitHub ↗
(color: string)

Source from the content-addressed store, hash-verified

39const clampInt = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v | 0));
40
41const parseSeriesColorToRgba01 = (color: string): Rgba =>
42 parseCssColorToRgba01(color) ?? ([0, 0, 0, 1] as const);
43
44const nextPow2 = (v: number): number => {
45 if (!Number.isFinite(v) || v <= 0) return 1;

Callers 1

prepareFunction · 0.70

Calls 1

parseCssColorToRgba01Function · 0.90

Tested by

no test coverage detected