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
- Host: GitHub
- URL: https://github.com/abschill/terminal-color
- Owner: abschill
- Created: 2021-11-03T02:24:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-14T16:58:42.000Z (about 3 years ago)
- Last Synced: 2025-01-28T22:17:06.068Z (8 months ago)
- Topics: color, colors, fmt, nodejs, printf, terminal, terminal-colors, terminal-style
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/terminal-color
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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)