| 1475 | return C && w && (C.textContent = y), g; |
| 1476 | } |
| 1477 | _applyMinimumContrast(e3, t3, i3, s3, r2, n2) { |
| 1478 | if (1 === this._optionsService.rawOptions.minimumContrastRatio || (0, _.treatGlyphAsBackgroundColor)(s3.getCode())) return false; |
| 1479 | const o2 = this._getContrastCache(s3); |
| 1480 | let a2; |
| 1481 | if (r2 || n2 || (a2 = o2.getColor(t3.rgba, i3.rgba)), void 0 === a2) { |
| 1482 | const e4 = this._optionsService.rawOptions.minimumContrastRatio / (s3.isDim() ? 2 : 1); |
| 1483 | a2 = c.color.ensureContrastRatio(r2 || t3, n2 || i3, e4), o2.setColor((r2 || t3).rgba, (n2 || i3).rgba, a2 ?? null); |
| 1484 | } |
| 1485 | return !!a2 && (this._addStyle(e3, `color:${a2.css}`), true); |
| 1486 | } |
| 1487 | _getContrastCache(e3) { |
| 1488 | return e3.isDim() ? this._themeService.colors.halfContrastCache : this._themeService.colors.contrastCache; |
| 1489 | } |