How to use the termcolors.defaults 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 / js / lib.js View on Github external
handleClick: function () {
    var type = this.refs.select.getDOMNode().value;
    var text = this.refs.textarea.getDOMNode().value;
    var colors = termcolors[type].import(text);
    colors = termcolors.defaults.fill(colors);
    AppActions.setAllColors(colors);
  },
github stayradiated / terminal.sexy / lib / components / import.react.jsx View on Github external
handleClick: function () {
    var type = this.refs.select.getDOMNode().value;
    var text = this.refs.textarea.getDOMNode().value;
    var colors = termcolors[type].import(text);
    colors = termcolors.defaults.fill(colors);
    actions.setAllColors('terminal.sexy', colors);
  },
github stayradiated / terminal.sexy / lib / _message_app.jsx View on Github external
var importColors = function (colors) {
  state.colors = TermColors.defaults.fill(colors);
  render();
};
github stayradiated / terminal.sexy / lib / stores / AppStore.js View on Github external
var _ = require('lodash');
var Signals = require('signals');
var termcolors = require('termcolors');
var AppDispatcher = require('../dispatchers/AppDispatcher');
var AppConstants = require('../constants/AppConstants');
var url = require('../formats/url');

var _colors = url.import(location.hash);
if (_colors === false) {
  _colors = _.clone(termcolors.defaults.colors);
}

var AppStore = Signals.convert({

  getColors: function () {
    return _colors;
  }

});

AppDispatcher.register(function (payload) {
  var action = payload.action;

  switch (action.actionType) {

    case AppConstants.SET_ALL_COLORS:
github stayradiated / terminal.sexy / js / lib.js View on Github external
},{}],28:[function(require,module,exports){
var _ = require('lodash');
var Signals = require('signals');
var termcolors = require('termcolors');
var AppDispatcher = require('../dispatchers/AppDispatcher');
var AppConstants = require('../constants/AppConstants');
var url = require('../formats/url');

var _colors = url.import(location.hash);
if (_colors === false) {
  _colors = _.clone(termcolors.defaults.colors);
}

var AppStore = Signals.convert({

  getColors: function () {
    return _colors;
  }

});

AppDispatcher.register(function (payload) {
  var action = payload.action;

  switch (action.actionType) {

    case AppConstants.SET_ALL_COLORS:

termcolors

Convert color schemes to multiple terminal configs

MIT
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis