MCPcopy Index your code
hub / github.com/codeaashu/claude-code / _getForegroundColor

Method _getForegroundColor

src/server/web/public/terminal.js:7705–7722  ·  view source on GitHub ↗
(e3, t3, i3, r2, o2, a2, h2, l2, d2, _2)

Source from the content-addressed store, hash-verified

7703 default:
7704 r2 = i3 ? n.color.opaque(this._config.colors.foreground) : this._config.colors.background;
7705 }
7706 return r2;
7707 }
7708 _getForegroundColor(e3, t3, i3, r2, o2, a2, h2, l2, d2, _2) {
7709 const u2 = this._getMinimumContrastColor(e3, t3, i3, r2, o2, a2, h2, d2, l2, _2);
7710 if (u2) return u2;
7711 let g2;
7712 switch (o2) {
7713 case 16777216:
7714 case 33554432:
7715 this._config.drawBoldTextInBrightColors && d2 && a2 < 8 && (a2 += 8), g2 = this._getColorFromAnsiIndex(a2);
7716 break;
7717 case 50331648:
7718 const e4 = c.AttributeData.toColorRGB(a2);
7719 g2 = n.channels.toColor(e4[0], e4[1], e4[2]);
7720 break;
7721 default:
7722 g2 = h2 ? this._config.colors.background : this._config.colors.foreground;
7723 }
7724 return this._config.allowTransparency && (g2 = n.color.opaque(g2)), l2 && (g2 = n.color.multiplyOpacity(g2, s2.DIM_OPACITY)), g2;
7725 }

Callers 1

_drawToCacheMethod · 0.95

Calls 3

toColorRGBMethod · 0.80

Tested by

no test coverage detected