# tty-strings-colorer

> Colorer for TTY (TeleTYpewriter) Terminal/Console Written Strings

Latest version **1.0.1** (published 2026-06-15) · 0BSD license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install tty-strings-colorer
pnpm add tty-strings-colorer
yarn add tty-strings-colorer
bun add tty-strings-colorer
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-06-15 |
| First published | 2018-06-11 |
| Weekly downloads | 0 |
| License | 0BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joseph Baking |
| Maintainers | jpbaking |
| Keywords | tty, strings, color, colorer, jpbaking |

## Links

- npm: https://www.npmjs.com/package/tty-strings-colorer
- Repository: https://github.com/jpbaking/tty-strings-colorer
- Homepage: https://github.com/jpbaking/tty-strings-colorer#readme
- Issues: https://github.com/jpbaking/tty-strings-colorer/issues
- npm.io page: https://npm.io/package/tty-strings-colorer

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2026-06-15
- 1.0.0 — 2018-06-11

## README

# tty-strings-colorer

> **DEPRECATED**
>
> This package is no longer maintained.
>
> **Limitations:**
>
> - Only ANSI 4-bit color (8 colors) — no extended 16-color, 256-color, or true color (RGB) support.
> - No TTY detection — escape codes are emitted even when stdout is piped to a file, corrupting log files and CI output.
> - No TypeScript types.
> - No "bright" foreground/background color variants, which are standard in most terminals (`bright` here is a text format attribute, not a color modifier).
> - Methods return different types depending on whether a string argument is passed, making the chaining API unintuitive.
>
> **Recommended alternatives:**
>
> | Package | True Color | TTY Detection | TypeScript |
> |---|---|---|---|
> | [chalk](https://github.com/chalk/chalk) | Yes | Yes | Yes |
> | [picocolors](https://github.com/alexeyraspopov/picocolors) | No | Yes | Yes |
> | [kleur](https://github.com/lukeed/kleur) | No | Yes | Yes |
> | [ansi-colors](https://github.com/doowb/ansi-colors) | No | Yes | Yes |
>
> [chalk](https://github.com/chalk/chalk) is the de facto standard and covers everything this package does and more. [picocolors](https://github.com/alexeyraspopov/picocolors) is the go-to when minimal bundle size matters.

### Version: 1.0.1

Colorer for TTY (TeleTYpewriter) Terminal/Console Written Strings

_[tty-strings-colorer](https://github.com/jpbaking/tty-strings-colorer) by [jpbaking](https://github.com/jpbaking)_

## Sample Usage

### Code:
```javascript
console.log(
  '0) default console/terminal format/color')

// BASIC USAGE
const colorer = require('tty-strings-colorer')();
console.log(colorer.bright(
  '1) colorer.bright(string)'));
console.log(colorer.bgBlue(
  '2) colorer.bgBlue(string)'));
console.log(colorer.fgYellow(
  '3) colorer.fgYellow(string)'));
console.log(colorer.bgRed().fgYellow(
  '4) colorer.bgBlue().fgYellow(string)'));

// PRESET
const green = require('tty-strings-colorer')('green');
console.log(green.color(
  '5) green.color(string)'));

const greenOnWhite = require('tty-strings-colorer')('green', 'white');
console.log(greenOnWhite.color(
  '7) greenOnWhite.color(string)'));
```

### Output:
![Sample Output](.readme/ColorTestOutput.png)

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