Merge branch 'master' into inactiveSelection
This commit is contained in:
@@ -250,6 +250,13 @@ export class DomRendererRowFactory {
|
||||
}
|
||||
}
|
||||
|
||||
// If there is no background override by now it's the original color, so apply dim if needed
|
||||
if (!bgOverride) {
|
||||
if (cell.isDim()) {
|
||||
bgOverride = color.multiplyOpacity(resolvedBg, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
// Foreground
|
||||
switch (fgColorMode) {
|
||||
case Attributes.CM_P16:
|
||||
|
||||
@@ -84,6 +84,11 @@ export namespace color {
|
||||
};
|
||||
}
|
||||
|
||||
export function multiplyOpacity(color: IColor, factor: number): IColor {
|
||||
const a = color.rgba & 0xFF;
|
||||
return opacity(color, (a * factor) / 0xFF);
|
||||
}
|
||||
|
||||
export function toColorRGB(color: IColor): IColorRGB {
|
||||
return [(color.rgba >> 24) & 0xFF, (color.rgba >> 16) & 0xFF, (color.rgba >> 8) & 0xFF];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user