MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / lerpColor

Function lerpColor

src/cli/prompts/gradient.tsx:34–36  ·  view source on GitHub ↗
(a: RGB, b: RGB, t: number)

Source from the content-addressed store, hash-verified

32}
33
34export function lerpColor(a: RGB, b: RGB, t: number): RGB {
35 return [lerp(a[0], b[0], t), lerp(a[1], b[1], t), lerp(a[2], b[2], t)];
36}
37
38/** Sample a multi-stop gradient at position p∈[0,1]. Clamps out-of-range p. */
39export function sampleStops(stops: RGB[], p: number): RGB {

Callers 2

gradient.test.tsFile · 0.85
sampleStopsFunction · 0.85

Calls 1

lerpFunction · 0.85

Tested by

no test coverage detected