(indexed: RGBA[], rgba: RGBA)
| 466 | } |
| 467 | |
| 468 | function quantizeColor(indexed: RGBA[], rgba: RGBA): RGBA { |
| 469 | if (rgba.a === 0 || rgba.intent === "default" || rgba.intent === "indexed") { |
| 470 | return RGBA.clone(rgba) |
| 471 | } |
| 472 | |
| 473 | return nearestIndexed(indexed, rgba) |
| 474 | } |
| 475 | |
| 476 | function quantizeTheme(theme: TuiThemeCurrent, indexed: RGBA[]): TuiThemeCurrent { |
| 477 | const resolved = Object.fromEntries( |
no test coverage detected