/** * Blends `var(--color-primary)` at a descending opacity for position `index` * out of `count` items (100% → 20%), returning a CSS `color-mix` value. * * Used by PipelineChart and PipelineBoard to give each stage a distinct shade * of the tenant primary color without needing per-stage color tokens. */ export function pipelinePrimaryColor(index: number, count: number): string { const opacity = count <= 1 ? 1 : 1 - (index / (count - 1)) * 0.8; return `color-mix(in srgb, var(--color-primary) ${Math.round(opacity * 100)}%, transparent)`; }