Merge branch 'master' into pr/jerch/2751

This commit is contained in:
Daniel Imms
2020-05-03 07:14:02 -07:00
125 changed files with 5510 additions and 3736 deletions
+3 -2
View File
@@ -7,14 +7,15 @@ import { IAttributeData, IColorRGB, IExtendedAttrs } from 'common/Types';
import { Attributes, FgFlags, BgFlags, UnderlineStyle } from 'common/buffer/Constants';
export class AttributeData implements IAttributeData {
static toColorRGB(value: number): IColorRGB {
public static toColorRGB(value: number): IColorRGB {
return [
value >>> Attributes.RED_SHIFT & 255,
value >>> Attributes.GREEN_SHIFT & 255,
value & 255
];
}
static fromColorRGB(value: IColorRGB): number {
public static fromColorRGB(value: IColorRGB): number {
return (value[0] & 255) << Attributes.RED_SHIFT | (value[1] & 255) << Attributes.GREEN_SHIFT | value[2] & 255;
}