An open API service indexing awesome lists of open source software.

https://github.com/abschill/terminal-color

Lightweight Terminal Colors for Node
https://github.com/abschill/terminal-color

color colors fmt nodejs printf terminal terminal-colors terminal-style

Last synced: 8 months ago
JSON representation

Lightweight Terminal Colors for Node

Awesome Lists containing this project

README

          

# Installation

```yarn install terminal-color```

or

``` npm install terminal-color```

```
const { color } = require('terminal-color');
color.fg.red('Hello World');
```

## public members

`bg`
effects background of text

`fg`
effects foreground of text

## colors

applies to both background and foreground

`black`

`yellow`

`white`

`cyan`

`blue`

`purple`

`red`

`green`

`cyan`

[examples](./examples/index.cjs)
[full type defs](./cjs/index.d.ts)