MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / interpolateColor

Function interpolateColor

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

Source from the content-addressed store, hash-verified

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