Skip to content

Commit

Permalink
fix(text-canvas): fix FMT_ANSI256 bg bitshift
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jan 8, 2021
1 parent 7e054c1 commit b50a0f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/text-canvas/src/ansi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const FMT_ANSI16: StringFormat = {
};

export const FMT_ANSI256: StringFormat = {
start: (x: number) => `\x1b[38;5;${x & 0xff};48;5;${x >>> 16}m`,
start: (x: number) => `\x1b[38;5;${x & 0xff};48;5;${x >>> 8}m`,
end: ANSI_RESET,
prefix: ANSI_RESET,
suffix: "\n",
Expand Down

0 comments on commit b50a0f9

Please sign in to comment.