MCPcopy
hub / github.com/xtermjs/xterm.js / toColorRGB

Method toColorRGB

src/common/buffer/AttributeData.ts:10–16  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

8
9export class AttributeData implements IAttributeData {
10 public static toColorRGB(value: number): IColorRGB {
11 return [
12 value >>> Attributes.RED_SHIFT & 255,
13 value >>> Attributes.GREEN_SHIFT & 255,
14 value & 255
15 ];
16 }
17
18 public static fromColorRGB(value: IColorRGB): number {
19 return (value[0] & 255) << Attributes.RED_SHIFT | (value[1] & 255) << Attributes.GREEN_SHIFT | value[2] & 255;

Callers 7

_handleColorEventMethod · 0.80
createRowMethod · 0.80
extractActiveBgFunction · 0.80
_getBackgroundColorMethod · 0.80
_getForegroundColorMethod · 0.80
_drawToCacheMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected