(theme: TuiThemeCurrent, indexed: RGBA[])
| 474 | } |
| 475 | |
| 476 | function quantizeTheme(theme: TuiThemeCurrent, indexed: RGBA[]): TuiThemeCurrent { |
| 477 | const resolved = Object.fromEntries( |
| 478 | Object.entries(theme) |
| 479 | .filter(([key]) => key !== "thinkingOpacity") |
| 480 | .map(([key, value]) => [key, quantizeColor(indexed, value as RGBA)]), |
| 481 | ) as Partial<Record<ThemeColor, RGBA>> |
| 482 | |
| 483 | return { |
| 484 | ...(resolved as Record<ThemeColor, RGBA>), |
| 485 | thinkingOpacity: theme.thinkingOpacity, |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | function splashTheme(theme: TuiThemeCurrent, indexed: RGBA[]): RunSplashTheme { |
| 490 | const left = nearestIndexed(indexed, theme.textMuted) |
no test coverage detected