Skip to content

Commit

Permalink
Revert changes to default colors
Browse files Browse the repository at this point in the history
Revert previous changes that disabled 256 color support for the
terminal. Add new set of colors and set the terminal name to be
xterm-256color by default.
  • Loading branch information
jeremyramin committed Oct 9, 2015
1 parent 5d74aa1 commit 1f2f092
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Makefile.gyp
*.target.gyp.mk
*.node
example/*.log
npm-debug.log
27 changes: 24 additions & 3 deletions src/term.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,31 @@ Terminal.xtermColors = [
'#ffffff' // white
];

Terminal.terminalColors = [
// dark:
'#000000', // black
'#990000', // red3
'#00A600', // green3
'#999900', // yellow3
'#0001B2', // blue2
'#B200B3', // magenta3
'#01A6B2', // cyan3
'#BFBFBF', // gray90
// bright:
'#666666', // gray50
'#ff0000', // red
'#00ff00', // green
'#ffff00', // yellow
'#0000ff', // blue
'#ff00ff', // magenta
'#00ffff', // cyan
'#ffffff' // white
];

// Colors 0-15 + 16-255
// Much thanks to TooTallNate for writing this.
Terminal.colors = (function() {
var colors = Terminal.tangoColors.slice()
var colors = Terminal.terminalColors.slice()
, r = [0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff]
, i;

Expand Down Expand Up @@ -434,9 +455,9 @@ Terminal.vcolors = (function() {
*/

Terminal.defaults = {
colors: Terminal.xtermColors,
colors: Terminal.colors,
convertEol: false,
termName: 'xterm',
termName: 'xterm-256color',
geometry: [80, 40],
cursorBlink: true,
visualBell: false,
Expand Down

0 comments on commit 1f2f092

Please sign in to comment.