Socket
Socket
Sign inDemoInstall

@blessed/themes

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @blessed/themes

Themes for blessed console apps


Version published
Weekly downloads
1
Maintainers
1
Install size
143 kB
Created
Weekly downloads
 

Readme

Source

:rainbow: blessed-themes :lollipop:

Themes for TUI (terminal user inteface) apps created using blessed.

Install

npm install @blessed/themes

Using yarn

yarn add @blessed/themes

Using pnpm

pnpm add @blessed/themes

Usage

Create a styles.js file like this:

'use strict';

module.exports = function (colors) {

  // Destructure the colors for easy access
  const {
    primary: { background, foreground },
    normal: { red, green, blue, yellow, magenta, cyan },
  } = colors;

  return {
    colors, // this is for inline usage of theme colors for text and labels
    program: {
      bg: background,
      fg: foreground,
    },
    header: {
      border: {
        type: 'line',
        fg: foreground,
        bg: background,
      },
      style: {
        fg: red,
        bg: background,
      },
    },
  };
};

Using the theme

// Import the theme colors
const colors = require('blessed-themes/theme/Gruvbox-Dark');
// Pass the theme colors to styles
const theme = require('./styles')(colors.colors);

// Initialize the program, to change the default color of the terminal screen
const program = blessed.program();

// Use the bg and fg colors from the theme for the program
program.bg(theme.program.bg);
program.fg(theme.program.fg);

// Get the styles of a widget from the theme
const { style, border } = theme.header;

const header = blessed.box({
  parent: screen,
  content: 'My Awesome CLI',
  top: 0,
  left: 0,
  width: '30%',
  height: '10%',
  border,
  style,
});

Themes

You can find the list of theme names from themes folder.

Dracula

Dracula

3024.dark

3024.dark

3024.light

3024.light

Argonaut

Argonaut

Afterglow

Afterglow

Zenburn

Zenburn

Gruvbox-Dark

Gruvbox-Dark

Gruvbox-Light

Gruvbox-Light

Molokai

Molokai

Nord

Nord

Tango

Tango

Wombat

Wombat

Tomorrow-Night

Tomorrow-Night

Solarized-Dark

Solarized-Dark

Solarized-Light

Solarized-Light

Light Themes

  • Gruvbox-Light
  • Solarized-Light

Keywords

FAQs

Last updated on 06 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc