# @plotdb/colors

> coloring output

Latest version **0.0.3** (published 2022-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @plotdb/colors
pnpm add @plotdb/colors
yarn add @plotdb/colors
bun add @plotdb/colors
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2022-11-03 |
| First published | 2022-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zbryikt |
| Maintainers | tkirby |

## Links

- npm: https://www.npmjs.com/package/@plotdb/colors
- npm.io page: https://npm.io/package/@plotdb/colors

## Recent versions

- 0.0.3 (latest) — 2022-11-03
- 0.0.2 — 2022-01-24
- 0.0.1 — 2022-01-11

## README

# @plotdb/colors

get colors in your node.js console.


## Installation

    npm install --save @plotdb/colors


## Usage

    require("@plotdb/colors")
    console.log("some colored text".red);
    console.log("some colored text with red background".bgRed.yellow);
    colors.disable(); /* colored outputs are disabled after this */
    console.log("some text without style / color".bgRed.yellow);
    colors.enable(); /* colored outputs are disabled after this */
    console.log("color is back".bgRed.yellow);
    colors.red("some red text");
    colors.green.underline("some red text"); /* recursively */
    colors.green.underline.red("some red text"); /* will be red. high priority for deeper styles */
 

## Colors and Styles

| fg      | bright fg     | bg        | bright bg       | styles        |
|---------|---------------|-----------|-----------------|---------------|
| black   | brightRed     | bgBlack   | bgBrightRed     | reset         |
| red     | brightGreen   | bgRed     | bgBrightGreen   | bold          |
| green   | brightYellow  | bgGreen   | bgBrightYellow  | dim           |
| yellow  | brightBlue    | bgYellow  | bgBrightBlue    | italic        |
| blue    | brightMagenta | bgBlue    | bgBrightMagenta | underline     |
| magenta | brightCyan    | bgMagenta | bgBrightCyan    | inverse       |
| cyan    | brightWhite   | bgCyan    | bgBrightWhite   | hidden        |
| white   |               | bgWhite   |                 | strikethrough |
| gray    |               | bgGray    |                 |               |
| grey    |               | bgGrey    |                 |               |


## Note

`@plotdb/colors` extends String.prototype directly which may not be a good approach.


## Reference

 - https://github.com/marak/colors.js/


## License

MIT

---
_Source: https://npm.io/package/@plotdb/colors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
