Fix transparent foreground color

This commit is contained in:
dennnnny
2023-08-14 09:49:18 +08:00
parent bef87403db
commit 855e911398
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -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;
}
+1 -2
View File
@@ -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);