# tinguir

> Colorize your texts

Latest version **0.0.7** (published 2025-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install tinguir
pnpm add tinguir
yarn add tinguir
bun add tinguir
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2025-02-13 |
| First published | 2023-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | donato@afialapis.com |
| Maintainers | afialapis |

## Links

- npm: https://www.npmjs.com/package/tinguir
- Repository: https://github.com/afialapis/tinguir
- Homepage: https://www.afialapis.com/os/tinguir
- Issues: https://github.com/afialapis/tinguir/issues
- npm.io page: https://npm.io/package/tinguir

## Recent versions

- 0.0.7 (latest) — 2025-02-13
- 0.0.5 — 2025-02-12
- 0.0.4 — 2023-11-06
- 0.0.3 — 2023-03-15
- 0.0.2 — 2023-03-15
- 0.0.1 — 2023-03-15

## README

# tinguir

[![NPM Version](https://badge.fury.io/js/tinguir.svg)](https://www.npmjs.com/package/tinguir)
[![NPM Downloads](https://img.shields.io/npm/dm/tinguir.svg?style=flat)](https://www.npmjs.com/package/tinguir)


![tinguir logo](https://github.com/afialapis/tinguir/blob/main/logo/favicon/tinguir.png?raw=true)

---

> **[tinguir](https://academia.gal/dicionario/-/termo/tinguir)**. Verbo transitivo:

> **1** Darlle a [algo] unha determinada cor distinta da que tiña, particularmente mediante tintura. 

> _Levou unha saia á tinturaría para tinguila de negro. Tinguiu o pelo._

---

## Intro

`tinguir` is just for coloring your texts using [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code).

## Install

```
  npm i tinguir
```

## Usage

```js
import {magenta_bold} from 'tinguir'

console.log( magenta_bold()'This text will be magenta and bolded!) )

```

## API

### Color functions


Available colors are:

![tinguir colors](https://github.com/afialapis/tinguir/blob/main/tinguir_colors.png?raw=true)


| Solid          | Bold           | Light          | Italic           | Underline       | Invert           | Strike           |
| -------------- | -------------- | -------------- | ---------------- | --------------- | ---------------- | ---------------- |
| `black`        | `black_bold`   | `black_light`  | `black_italic`   | `black_under`   | `black_invert`   | `black_strike`   |
| `red`          | `red_bold`     | `red_light`    | `red_italic`     | `red_under`     | `red_invert`     | `red_strike`     |
| `green`        | `green_bold`   | `green_light`  | `green_italic`   | `green_under`   | `green_invert`   | `green_strike`   |
| `yellow`       | `yellow_bold`  | `yellow_light` | `yellow_italic`  | `yellow_under`  | `yellow_invert`  | `yellow_strike`  |
| `blue`         | `blue_bold`    | `blue_light`   | `blue_italic`    | `blue_under`    | `blue_invert`    | `blue_strike`    |
| `magenta`      | `magenta_bold` | `magenta_light`| `magenta_italic` | `magenta_under` | `magenta_invert` | `magenta_strike` |
| `cyan`         | `cyan_bold`    | `cyan_light`   | `cyan_italic`    | `cyan_under`    | `cyan_invert`    | `cyan_strike`    |
| `white`        | `white_bold`   | `white_light`  | `white_italic`   | `white_under`   | `white_invert`   | `white_strike`   |
| `gray`         | `gray_bold`    | `gray_light`   | `gray_italic`    | `gray_under`    | `gray_invert`    | `gray_strike`    |



### `uncolor`

There's also `uncolor(colored_string)` function, which servers for, surprise, remove color escape codes from a string.

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