# tintify

> Tintify tints your untinted terminal

Latest version **1.1.0** (published 2023-08-14) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 30/100 (F)** — status: abandoned.

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-08-14 |
| First published | 2023-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 21.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Unarray |
| Maintainers | unarray |
| Keywords | color, terminal, ansi, tint |

## Links

- npm: https://www.npmjs.com/package/tintify
- Repository: https://github.com/Unarray/Tintify
- Homepage: https://github.com/Unarray/Tintify#readme
- Issues: https://github.com/Unarray/Tintify/issues
- npm.io page: https://npm.io/package/tintify

## 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.1.0 (latest) — 2023-08-14
- 1.0.0 — 2023-04-17

## README

# Tintify
Tintify tints your untinted terminal

---
**Tintify** is an NPM package that brings you all you need to add colors and effects to your terminal!

This package isn't a simple list of ANSI escape sequences.
It brings you utilities functions that permit you to use custom RGB colors or the HEXADECIMAL notations.
In future update, we will bring you others functions like new formatters. Current formatters permit you to transform your message into an **rainbow** text, a linear gradient between two colors, a matrix style text or a format function where you can pass flags to replace with a color *(ie: flag `§3` or `§b` will be transformed to a color or effect according to the config)*

---
# Installation
```cmd
npm install tintify
```
OR
```cmd
pnpm install tintify
```

---
# Updates
Want to see new content? [Open an issue!](https://github.com/Unarray/Tintify/issues)

---
# Overview

## Basic usage
### Usage of constants
```js
import { forground, brightBackground } from "tintify";

console.log(`${forground.blue}Hello ${forground.red}${brightBackground.blue}World!`);
```
![Usage of constants output](./meta/usage-constants-output.jpg)

### Usage of functions
```js
import { forgroundRGBColor, backgroundRGBColor, hexToRgb } from "tintify";

const helloFgColor = forgroundRGBColor({red: 63, green: 112, blue: 84});
const worldFgColor = forgroundRGBColor(hexToRgb("#9d19c2"));
const worldBgColor = backgroundRGBColor({red: 63, green: 112, blue: 84});

console.log(`${helloFgColor}Hello ${worldFgColor}${worldBgColor}World!`);
```
![Usage of functions output](./meta/usage-functions-output.jpg)

## Formatters usage
### Linear gradient effect
```js
import { hexToRgb, linearGradient } from "tintify";

console.log(linearGradient("Tintify tints your untinted terminal", hexToRgb("#40db21"), {red: 255, green: 0, blue: 0}));
```
![Linear gradient output](./meta/linear-gradient-output.jpg)

### Matrix effect
```js
import { hexToRgb, matrix } from "tintify";

console.log(matrix("Tintify tints your untinted terminal", hexToRgb("#00FF00")));
console.log(matrix("Tintify tints your untinted terminal", hexToRgb("#00FF00"), 200));
```
![Matrix output](./meta/matrix-output.jpg)

### Rainbow effect
```js
import { hexToRgb, rainbow } from "tintify";

console.log(rainbow("Tintify   tints   your   untinted   terminal"));
console.log(rainbow("Tintify   tints   your   untinted   terminal", hexToRgb("#00FF00")));
console.log(rainbow("Tintify   tints   your   untinted   terminal", hexToRgb("#00FF00"), 100));
console.log(rainbow("Tintify   tints   your   untinted   terminal", hexToRgb("#00FF00"), 100, false));
```
![Rainbow output](./meta/rainbow-output.jpg)

### Format
```js
import { defaultFormatConfig, forground, format } from "tintify";

console.log(format("§2Hello §b§4World!"));
console.log(format("§2Hello §b§4World!", {
  ...defaultFormatConfig,
  "§2": forground.blue
}));
```
![Format output](./meta/format-output.jpg)

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