# ink-color-pipe

> Create color text with simpler style strings in Ink

Latest version **5.0.0** (published 2025-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install ink-color-pipe
pnpm add ink-color-pipe
yarn add ink-color-pipe
bun add ink-color-pipe
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2025-09-16 |
| First published | 2019-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | LitoMore |
| Maintainers | litomore |
| Keywords | ink-component, ink, component, chalk, chalk-pipe, react, jsx, terminal, color, term, console, command-line |

## Links

- npm: https://www.npmjs.com/package/ink-color-pipe
- Repository: https://github.com/LitoMore/ink-color-pipe
- Homepage: https://github.com/LitoMore/ink-color-pipe#readme
- Issues: https://github.com/LitoMore/ink-color-pipe/issues
- npm.io page: https://npm.io/package/ink-color-pipe

## Dependencies (1)

- [chalk-pipe](https://npm.io/package/chalk-pipe.md) ^6.2.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 5.0.0 (latest) — 2025-09-16
- 4.0.2 — 2025-03-23
- 4.0.1 — 2024-08-17
- 4.0.0 — 2024-08-17
- 3.0.0 — 2021-04-25
- 2.0.0 — 2020-09-19
- 1.0.0 — 2020-04-29
- 0.2.0 — 2019-04-09
- 0.1.0 — 2019-03-09

## README

# ink-color-pipe

> [chalk-pipe](https://github.com/LitoMore/chalk-pipe) component for [Ink 5](https://github.com/vadimdemedes/ink)

Create color text with simpler style strings in Ink

![](https://raw.githubusercontent.com/LitoMore/ink-color-pipe/master/screenshot.svg?sanitize=true)

## Install

```bash
$ npm i ink-color-pipe
```

## Usage

This brings you a convenient way to use some color schemes.

<img src="https://raw.githubusercontent.com/LitoMore/ink-color-pipe/master/media/demo.jpg" width="105px"/>

```javascript
import React from "react";
import { render, Text } from "ink";
import Color from "ink-color-pipe";

const link = "blue.underline";
const error = "bgRed.white";

render(
	<Text>
		<Color styles={link}>Unicorn</Color>
		<Color styles={error}>{" Error "}</Color>
	</Text>,
);
```

## Built-in Chalk

All Chalk and `chalk-pipe` exported functions, variables, and declarations are exposed for convenience.

This can be useful if you want to use `chalk` directly.

```js
import { Chalk, chalk, chalkPipe } from "ink-color-pipe";

const customChalk = new Chalk({ level: 0 });

console.log(chalk.blue("Hello"));
console.log(customChalk.green("World"));

console.log(chalkPipe("blue.bgGreen.italic")("Hello World"));
```

## API

### `<Color>`

`<Color>` is using [`<Transform>`](https://github.com/vadimdemedes/ink#transform) for text rendering.

#### styles

Type: `string`

Use dot `.` to separeate multiple styles.

## Valid Styles

- [Modifiers](https://github.com/chalk/chalk#modifiers)
- [Colors](https://github.com/chalk/chalk#colors)
- [Background colors](https://github.com/chalk/chalk#background-colors)
- [Hex triplet](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet)
- [CSS keywords](https://www.w3.org/wiki/CSS/Properties/color/keywords)

## Related

- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings

## License

MIT

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