Skip to content

Commit

Permalink
Fix transparent foreground color
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennnnny committed Aug 14, 2023
1 parent bef8740 commit 855e911
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/browser/renderer/shared/TextureAtlas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export class TextureAtlas implements ITextureAtlas {
case Attributes.CM_DEFAULT:
default:
if (inverse) {
result = this._config.colors.foreground;
result = color.opaque(this._config.colors.foreground);
} else {
result = this._config.colors.background;
}
Expand Down
3 changes: 1 addition & 2 deletions src/browser/services/ThemeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ export class ThemeService extends Disposable implements IThemeService {
*/
private _setTheme(theme: ITheme = {}): void {
const colors = this._colors;
colors.foreground = color.opaque(parseColor(theme.foreground, DEFAULT_FOREGROUND));
console.warn("xterm.js is not fully support foreground colors with transparent, so it will the foreground colors alpha channel to 255.")
colors.foreground = parseColor(theme.foreground, DEFAULT_FOREGROUND);
colors.background = parseColor(theme.background, DEFAULT_BACKGROUND);
colors.cursor = parseColor(theme.cursor, DEFAULT_CURSOR);
colors.cursorAccent = parseColor(theme.cursorAccent, DEFAULT_CURSOR_ACCENT);
Expand Down

0 comments on commit 855e911

Please sign in to comment.