MCPcopy Index your code
hub / github.com/codeaashu/claude-code / interpolateColor

Function interpolateColor

src/components/Spinner/utils.ts:14–24  ·  view source on GitHub ↗
(
  color1: RGBColorType,
  color2: RGBColorType,
  t: number, // 0 to 1
)

Source from the content-addressed store, hash-verified

12
13// Interpolate between two RGB colors
14export function interpolateColor(
15 color1: RGBColorType,
16 color2: RGBColorType,
17 t: number, // 0 to 1
18): RGBColorType {
19 return {
20 r: Math.round(color1.r + (color2.r - color1.r) * t),
21 g: Math.round(color1.g + (color2.g - color1.g) * t),
22 b: Math.round(color1.b + (color2.b - color1.b) * t),
23 }
24}
25
26// Convert RGB object to rgb() color string for Text component
27export function toRGBColor(color: RGBColorType): RGBColorString {

Callers 5

GlimmerMessageFunction · 0.85
SpinnerGlyphFunction · 0.85
FlashingCharFunction · 0.85
SpinnerAnimationRowFunction · 0.85
ProcessingShimmerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected