diff --git a/addons/xterm-addon-webgl/src/RectangleRenderer.ts b/addons/xterm-addon-webgl/src/RectangleRenderer.ts index 401f4568..6dfee505 100644 --- a/addons/xterm-addon-webgl/src/RectangleRenderer.ts +++ b/addons/xterm-addon-webgl/src/RectangleRenderer.ts @@ -275,7 +275,11 @@ export class RectangleRenderer { if (bg === INVERTED_DEFAULT_COLOR) { color = this._colors.foreground; } else if (is256Color(bg)) { + // TODO: Need to do a separate set for 16 color palette? color = this._colors.ansi[bg]; + } else { + // TODO: Add support for true color + color = this._colors.foreground; } if (vertices.attributes.length < offset + 4) { vertices.attributes = expandFloat32Array(vertices.attributes, this._terminal.rows * this._terminal.cols * INDICES_PER_RECTANGLE); diff --git a/addons/xterm-addon-webgl/src/atlas/WebglCharAtlas.ts b/addons/xterm-addon-webgl/src/atlas/WebglCharAtlas.ts index fa18734b..33464269 100644 --- a/addons/xterm-addon-webgl/src/atlas/WebglCharAtlas.ts +++ b/addons/xterm-addon-webgl/src/atlas/WebglCharAtlas.ts @@ -170,8 +170,10 @@ export class WebglCharAtlas extends BaseCharAtlas { } else if (bg === INVERTED_DEFAULT_COLOR) { return this._config.colors.foreground; } else if (is256Color(bg)) { + // TODO: Need to do a separate set for 16 color palette? return this._getColorFromAnsiIndex(bg); } + // TODO: Support true color return this._config.colors.background; } @@ -179,8 +181,10 @@ export class WebglCharAtlas extends BaseCharAtlas { if (fg === INVERTED_DEFAULT_COLOR) { return this._config.colors.background; } else if (is256Color(fg)) { + // TODO: Need to do a separate set for 16 color palette? return this._getColorFromAnsiIndex(fg); } + // TODO: Support true color return this._config.colors.foreground; }