Support opaque inverse background in webgl, add test

This commit is contained in:
Daniel Imms
2019-11-25 15:06:28 -08:00
parent ef05a6a053
commit 1ff1809ab7
3 changed files with 24 additions and 6 deletions
@@ -228,7 +228,12 @@ export class WebglCharAtlas implements IDisposable {
case Attributes.CM_DEFAULT:
default:
if (inverse) {
return this._config.colors.background.css;
const bg = this._config.colors.background.css;
if (bg.length === 9) {
// Remove bg alpha channel if present
return bg.substr(0, 7);
}
return bg;
}
return this._config.colors.foreground.css;
}