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

https://github.com/sina-byn/node-color-picker

A simple terminal color picker for Node.js
https://github.com/sina-byn/node-color-picker

cli ink javascript nodejs react terminal typescript

Last synced: 6 months ago
JSON representation

A simple terminal color picker for Node.js

Awesome Lists containing this project

README

          

# node-color-picker [![NPM version](https://img.shields.io/npm/v/node-color-picker.svg?style=flat)](https://www.npmjs.com/package/node-color-picker) [![NPM monthly downloads](https://img.shields.io/npm/dm/node-color-picker.svg?style=flat)](https://npmjs.org/package/node-color-picker) [![NPM total downloads](https://img.shields.io/npm/dt/node-color-picker.svg?style=flat)](https://npmjs.org/package/node-color-picker)

A simple terminal color picker for Node.js.

Please consider following this project's author, [Sina Bayandorian](https://github.com/sina-byn), and consider starring the project to show your :heart: and support.

> If you're building an interactive CLI with Ink, be sure to check out [ink-color-picker](https://www.npmjs.com/package/ink-color-picker) for a powerful and user-friendly Ink component.

![Demo GIF](assets/demo.gif)

## Installation

```shell
npm i node-color-picker
```

## Usage

```js
// * index.js

import { colorPicker } from 'node-color-picker';

const app = async () => {
const color = await colorPicker();
console.log(color);
};

app();
```

Then run :

```shell
node index.js
```

## Options

| | Type | Default | Description |
| ---- | ------- | ------- | ------------------------------- |
| hint | boolean | `True` | Whether to show the hint or not |

---

```
colorPicker(options);
```