How to use colors

Comprehensive colors code examples:

How to use colors.bgBrightBlue:

107
108
109
110
111
112
113
114
115
116
}

const tabContainerSettings = {
  screen,
  tabSeperator: ' | ',
  activeColorFunc: colors.bgBrightBlue.black,
  dirtyColorFunc: colors.underline
}

const tabContainerA = BlessedTabContainer({

How to use colors.underline:

108
109
110
111
112
113
114
115
116
117

const tabContainerSettings = {
  screen,
  tabSeperator: ' | ',
  activeColorFunc: colors.bgBrightBlue.black,
  dirtyColorFunc: colors.underline
}

const tabContainerA = BlessedTabContainer({
  ...tabContainerSettings,

How to use colors.bgGreen:

3
4
5
6
7
8
9
10
11
12
let print = console.log;
let symbols = require('mocha/lib/reporters/base').symbols;

let styles = {
  error: colors.bgRed.white.bold,
  success: colors.bgGreen.white.bold,
  scenario: colors.magenta.bold,
  basic: colors.white,
  debug: colors.cyan
};

How to use colors.magenta:

4
5
6
7
8
9
10
11
12
let symbols = require('mocha/lib/reporters/base').symbols;

let styles = {
  error: colors.bgRed.white.bold,
  success: colors.bgGreen.white.bold,
  scenario: colors.magenta.bold,
  basic: colors.white,
  debug: colors.cyan
};

How to use colors.blue:

22
23
24
25
26
27
28
29
30
31
  console.log('');
  console.log('Examples:');
  console.log(`  $ ${program._name} -c ./config.json`);
  console.log(`  $ ${program._name} -i NDJjNGVx........GZzZGY=\n`);
  console.log(
    colors.blue(
      'For questions and error reports please visit the github repository: https://github.com/ofarukcaki/duckimport'
    )
  );
});

How to use colors.bgYellow:

46
47
48
49
50
51
52
53
54
55
colors: ['green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'gray', 'red'],
stylers: {
    warn: function(args) {
        for (var i = 0; i < args.length; i++) {
            if (typeof args[i] === 'string') {
                args[i] = colors.bgYellow.black(args[i].black);
            }
        }
    },
    error: function(args) {

How to use colors.bold:

27
28
29
30
31
32
33
34
35
36
37
38
39




InteractiveController.prototype.start = function() {
  var view = this.view;


  view.setModeLine('Connected as %s', colors.bold(this.vox.nick));
  view.showHelp(
    util.format('Welcome, %s!', colors.yellow.bold(this.vox.nick)) + '\n\n' +
    util.format('To get started, type %s to follow someone, type %s to get help, or type %s to post a message to your stream.', colors.yellow.bold(':follow ' + colors.underline('nickname')), colors.yellow.bold(':help'), colors.yellow.bold("'")));

How to use colors.bgRed:

53
54
55
56
57
58
59
60
61
62
        }
    },
    error: function(args) {
        for (var i = 0; i < args.length; i++) {
            if (typeof args[i] === 'string') {
                args[i] = colors.bgRed.white(args[i].white);
            }
        }
    }
}

How to use colors.grey:

97
98
99
100
101
102
103
104
105
    if (pending) {
      if (!failed) style = style.bgYellow;
      msg += `, ${pending} pending`;
    }
    msg += "  ";
    print(status + style(msg) + colors.grey(` // ${duration}`));
  }
};

How to use colors.green:

66
67
68
69
70
71
72
73
74
75
scenario: {
  started: (test) => {

  },
  passed: (test) => {
    print(' ' + colors.green.bold(`${symbols.ok} OK`) + ' ' + colors.grey(`in ${test.duration}ms`));
    print();
  },
  failed: (test) => {
    print(' ' + colors.red.bold(`${symbols.err} FAILED`) + ' ' + colors.grey(`in ${test.duration}ms`));

How to use colors.cyan:

6
7
8
9
10
11
12
13
14
let styles = {
  error: colors.bgRed.white.bold,
  success: colors.bgGreen.white.bold,
  scenario: colors.magenta.bold,
  basic: colors.white,
  debug: colors.cyan
};

let outputLevel = 0;

How to use colors.red:

143
144
145
146
147
148
149
150
151
152

```js
var colors = require('colors/safe');

// set single property
var error = colors.red;
error('this is red');

// set theme
colors.setTheme({

How to use colors.yellow:

193
194
195
196
197
198
199
200
201
202
203
204
console.log(kv);
console.log(" ");


updater.checkForUpdates(function (upd, body) {
  if (upd != 0 && kubek_version != upd) {
    console.log(additional.getTimeFormatted(), colors.yellow(translator.translateHTML("{{consolemsg-yesupd}}", cfg['lang'])));
    console.log(additional.getTimeFormatted(), colors.yellow("https://github.com/Seeroy/kubek-minecraft-dashboard/releases/tag/" + upd));


    assets = body[0].assets;
    downloaded = false;