Fix fg color when there is a decoration override in canvas renderer
This commit is contained in:
@@ -479,13 +479,12 @@ export abstract class BaseRenderLayer implements IRenderLayer {
|
|||||||
let result = rgba.ensureContrastRatio(bgOverride ?? bgRgba, fgOverride ?? fgRgba, this._optionsService.rawOptions.minimumContrastRatio);
|
let result = rgba.ensureContrastRatio(bgOverride ?? bgRgba, fgOverride ?? fgRgba, this._optionsService.rawOptions.minimumContrastRatio);
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
if (!bgOverride && !fgOverride) {
|
if (!fgOverride) {
|
||||||
this._colors.contrastCache.setColor(cell.bg, cell.fg, null);
|
this._colors.contrastCache.setColor(cell.bg, cell.fg, null);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
// If it was an override and there was no contrast change, set as the result
|
// If it was an override and there was no contrast change, set as the result
|
||||||
// TODO: This is white when it should be green
|
result = fgOverride;
|
||||||
result = fgRgba;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const color: IColor = {
|
const color: IColor = {
|
||||||
|
|||||||
Reference in New Issue
Block a user