MCPcopy Create free account
hub / github.com/arctic-cli/interface / deriveInactiveColor

Function deriveInactiveColor

packages/arctic/src/cli/cmd/tui/ui/spinner.ts:239–244  ·  view source on GitHub ↗
(brightColor: ColorInput, factor: number = 0.2)

Source from the content-addressed store, hash-verified

237 * @returns The same color with reduced alpha for background-independent dimming
238 */
239export function deriveInactiveColor(brightColor: ColorInput, factor: number = 0.2): RGBA {
240 const baseRgba = brightColor instanceof RGBA ? brightColor : RGBA.fromHex(brightColor as string)
241
242 // Use the full color brightness but adjust alpha for background-independent dimming
243 return RGBA.fromValues(baseRgba.r, baseRgba.g, baseRgba.b, factor)
244}
245
246export type KnightRiderStyle = "blocks" | "diamonds"
247

Callers 2

createFramesFunction · 0.85
createColorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected