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

https://github.com/kabeep/palette-cli

> A Node.js Library to make your terminal input colorful._
https://github.com/kabeep/palette-cli

ansi chalk cli color console nodejs terminal

Last synced: 9 months ago
JSON representation

> A Node.js Library to make your terminal input colorful._

Awesome Lists containing this project

README

          

palette-cli

A Node.js Library to make your terminal input colorful.

[![NodeJS][node-image]][node-url]
[![Install Size][install-size-image]][install-size-url]
[![NPM][npm-image]][npm-url]
[![code style][code-style-image]][code-style-url]
[![License][license-image]][license-url]

English | [įŽ€äŊ“中文][zh-cn-url]


Help Info

## đŸ“Ļ Installation

```bash
npm install --global @kabeep/palette-cli
```

```bash
yarn add --global @kabeep/palette-cli
```

```bash
pnpm add --global @kabeep/palette-cli
```

## âš™ī¸ Usage

```bash
palette -h
```

```
palette [options]

Commands:
palette paint [styles..] Styling of terminal string [default] [aliases: color, style]
palette swatch [count|rgb..] Display color swatch & chips [aliases: card, chip]
palette tone 256-color lookup tables [aliases: table, chart]

Positionals:
string Text to be styled [string]
styles Keywords for color and style [string]

Options:
-c, --clipboard Write to the clipboard [boolean] [default: false]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]

Examples:
palette string red bgWhite bold Using the style keyword
palette string ff0000, bg0,255,0 Using Hex and RGB
palette string '#ff0000' 00ff00 The latter style is weighted higher
echo string | palette red Get string from stdin
palette string -c red Copies styled string to the clipboard
```


Help Info

```bash
palette tone -h
```

```
palette tone

256-color lookup tables

Options:
-s, --show-number Shows 256-colored numbering [boolean] [default: false]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]

Examples:
palette tone Show color blocks only
palette tone --show-number Show color blocks with color numbering
```


Help Info

```bash
palette swatch -h
```

```
palette swatch [count|rgb..]

Display color swatch & chips

Positionals:
count Number of random color samples [number] [default: 1]
rgb Specifies the RGB value of the card. [number] [default: []]

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]

Examples:
palette swatch Displays a random color swatches
palette swatch 8 Displays 8 random colored chips
palette swatch 255 255 255 Show the rgb(255, 255, 255) swatch
```

## 🔗 Related

- [palette][palette-url] - 🎨 The fastest Node.js library to set terminal text colours & styles with hex, rgb and
tree-shaking.

## 🤝 Contribution

Contributions via Pull Requests or [Issues][issues-url] are welcome.

## 📄 License

This project is licensed under the MIT License. See the [LICENSE][license-url] file for details.

[node-image]: https://img.shields.io/node/v/%40kabeep%2Fpalette-cli?color=lightseagreen
[node-url]: https://nodejs.org/

[npm-image]: https://img.shields.io/npm/d18m/%40kabeep%2Fpalette-cli?color=fa6673
[npm-url]: https://www.npmjs.com/package/@kabeep/palette-cli

[install-size-image]: https://packagephobia.com/badge?p=@kabeep/palette-cli
[install-size-url]: https://packagephobia.com/result?p=@kabeep/palette-cli

[code-style-image]: https://img.shields.io/badge/Formatted_with-Biome-cornflowerblue?style=flat&logo=biome
[code-style-url]: https://biomejs.dev/

[license-image]: https://img.shields.io/github/license/kabeep/palette-cli?color=slateblue
[license-url]: LICENSE

[en-us-url]: README.md
[zh-cn-url]: README.zh-CN.md

[palette-url]: https://github.com/kabeep/palette

[issues-url]: https://github.com/kabeep/palette-cli/issues