Skip to content
Vitaly Tomilov edited this page Oct 20, 2018 · 22 revisions

You can select either one of the predefined themes or create a custom theme.

Predefined Themes

Below is the list of all predefined themes, which can be selected by their name.

Example:

monitor.setTheme('bright');

NOTE: Images below look much better, if you click on them.

dimmed

This is the default theme used by the library.

dimmed

bright

bright

minimalist

minimalist

matrix

matrix

monochrome

monochrome

invertedMonochrome

monochromeInvert

invertedContrast

Unlike all other predefined themes, this one enforces white background.

monochromeInvert

Custom Themes

In order to use a custom theme, simply call setTheme, passing it an object with all the color properties, exactly as they are defined in file themes.js

Example
const color = require('cli-color'); // must use this color library;

const myTheme = {
    time: color.bgWhite.black,
    value: color.white,
    cn: color.yellow,
    tx: color.cyan,
    paramTitle: color.magenta,
    errorTitle: color.redBright,
    query: color.whiteBright,
    special: color.green,
    error: color.red
};

monitor.setTheme(myTheme); // selecting your own theme;

P.S. Library cli-color was chosen as the one best handling background colors.