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

https://github.com/dmtrkovalenko/trololors

Not the fastest terminal colors library. Don't even ask about size.
https://github.com/dmtrkovalenko/trololors

Last synced: 12 months ago
JSON representation

Not the fastest terminal colors library. Don't even ask about size.

Awesome Lists containing this project

README

          



TROLOLORS


Not the fastest terminal colors library. Don't even ask about size.






# Why?

Don't even try to use it. But maybe you need to say to your boss that you used RUST for some project.

## Features

- **142x slower and 52x bigger than [nanocolors](https://github.com/ai/nanocolors)**
- NO additional colors
- Non tree-shakable, loads through wasm each time you import it
- Not maintained
- Have 2 dependencies, build-time dependencies

# Benchmark

At least we tried

```
chalk 24,616,741 ops/sec
cli-color 1,285,172 ops/sec
ansi-colors 5,777,891 ops/sec
kleur 25,739,702 ops/sec
kleur/colors 40,477,790 ops/sec
colorette 44,079,926 ops/sec
nanocolors 44,129,214 ops/sec
picocolors 43,642,815 ops/sec
trololors 292,323 ops/sec
```

## Install

```sh
npm install trololors
```

## Usage

![no god pleas no](./no-god.gif)
```js
import * as colors from 'trololors';

console.log(colors.red('trololo'));
```

### Colors

- `black`
- `red`
- `green`
- `yellow`
- `blue`
- `magenta`
- `cyan`
- `white`
- `gray`

### Background colors

- `bgBlack`
- `bgRed`
- `bgGreen`
- `bgYellow`
- `bgBlue`
- `bgMagenta`
- `bgCyan`
- `bgWhite`
- `bgGray`