Use constants for default colors

This commit is contained in:
Daniel Imms
2018-10-09 11:12:35 -07:00
parent 791c020a56
commit 1e9564788e
9 changed files with 30 additions and 26 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
import { IRenderLayer, IColorSet, IRenderDimensions } from './Types';
import { CharData, ITerminal } from '../Types';
import { DIM_OPACITY, INVERTED_DEFAULT_COLOR, IGlyphIdentifier } from './atlas/Types';
import { DIM_OPACITY, INVERTED_DEFAULT_COLOR, IGlyphIdentifier, DEFAULT_COLOR } from './atlas/Types';
import BaseCharAtlas from './atlas/BaseCharAtlas';
import { acquireCharAtlas } from './atlas/CharAtlasCache';
import { CHAR_DATA_CHAR_INDEX } from '../Buffer';
@@ -298,7 +298,7 @@ export abstract class BaseRenderLayer implements IRenderLayer {
if (fg === INVERTED_DEFAULT_COLOR) {
this._ctx.fillStyle = this._colors.background.css;
} else if (fg < 256) {
} else if (fg < DEFAULT_COLOR) {
// 256 color support
this._ctx.fillStyle = this._colors.ansi[fg].css;
} else {