How to use the termcolors.css function in termcolors

To help you get started, we’ve selected a few termcolors examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stayradiated / terminal.sexy / lib / _message_app.jsx View on Github external
var render = function () {

  if (state.colors) {
    var css = TermColors.css.export(state.colors);
    var bodyBg;
    if (state.colors.background.toHsl().l > 0.5) {
      bodyBg = tiny.darken(state.colors.background);
    } else {
      bodyBg = tiny.lighten(state.colors.background);
    }

    injectStyles(css + [
      '.window {background: ' + state.colors.background.toHexString() + ' !important;}',
      '.window .title{color: ' + state.colors.foreground.toHexString() + ' !important;}',
      'body {background: ' + bodyBg.toHexString() + ' !important;}',
    ].join('\n'));
  }

  windows.open(, {
    id: 'importer',

termcolors

Convert color schemes to multiple terminal configs

MIT
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis