Hyper: Colors

Created on 5 Jul 2016  ·  11Comments  ·  Source: vercel/hyper

Terminal colors are slightly different (not respected?)
see

Hyperterm:
screen shot 2016-07-05 at 02 25 00

Terminal:
screen shot 2016-07-05 at 02 25 12

Most helpful comment

I noticed that the overall colors are somewhat respected, just a different shade, I think the best way rather than enforce values is to let the user use their own bash colors

All 11 comments

We just have ugly defaults. If someone wants to suggest a beautiful theme, I'm all eyes 🙈

I noticed that the overall colors are somewhat respected, just a different shade, I think the best way rather than enforce values is to let the user use their own bash colors

@dzannotti either way, even if it's respecting "blue" or "cyan" or whatever, the choice of default color is not a good one. There's little contrast and in general it could be nicer looking (more pastel for example.)

I looked through the term docs (not too helpful) and the source in Hyperterm. Am I being correct in that the way to alter the colours in the term window is to inject "user-css"?

this.term.prefs_.set('user-css', 'objectUrl');

Ultimately I always end up reading the source: https://github.com/dbkaplun/hterm-umdjs/blob/master/dist/index.js

Seems like you can pass a custom color palette through the preference system.
https://github.com/dbkaplun/hterm-umdjs/blob/master/dist/index.js#L10815

And these are the default colors: https://github.com/dbkaplun/hterm-umdjs/blob/master/dist/index.js#L577-L1236

Since we probably don't want to override all, you could do something like:

Object.assign({}, lib.colors.colorNames, {
  blue: …
});

I could take this one and add some pastel defaults

I created one with pastel colors:

screen shot 2016-07-05 at 10 00 40 pm

But I think a high contrast one looks more cool. It's keying off the cursor and the zeit.co design

screen shot 2016-07-05 at 9 38 53 pm

wow they both look 😍

Thanks @rauchg! Really digging this whole stack. Wonderful job pulling this together! Going to submit a PR with the higher contrast one, since it feels like the right one right now.

// high contrast
this.term.prefs_.set('color-palette-overrides', {
      '0': '#000000',
      '1': '#ff0000',
      '2': '#33ff00',
      '3': '#ffff00',
      '4': '#0066ff',
      '5': '#cc00ff',
      '6': '#00ffff',
      '7': '#d0d0d0',
      '8': '#808080',
      '9': '#ff0000',
      '10': '#33ff00',
      '11': '#ffff00',
      '12': '#0066ff',
      '13': '#cc00ff',
      '14': '#00ffff',
      '15': '#ffffff'
    });
// pastel
this.term.prefs_.set('color-palette-overrides', {
      '0': '#272822',
      '1': '#e06c75',
      '2': '#98c379',
      '3': '#e5c07b',
      '4': '#61afef',
      '5': '#c678dd',
      '6': '#56b6c2',
      '7': '#abb2bf',
      '8': '#75715e',
      '9': '#e06c75',
      '10': '#98c379',
      '11': '#e5c07b',
      '12': '#61afef',
      '13': '#c678dd',
      '14': '#56b6c2',
      '15': '#ececec'
    });

This great! Would the concept of default themes that can be toggled be outrageous?

I really enjoy solarized... http://ethanschoonover.com/solarized

@howardroark this was one of the biggest motivations for this project. Programmatic configuration of every aspect of the terminal through plugins =]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dbkaplun picture dbkaplun  ·  3Comments

anthonyettinger picture anthonyettinger  ·  3Comments

rauchg picture rauchg  ·  3Comments

aem picture aem  ·  3Comments

stan-stripe picture stan-stripe  ·  3Comments