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.
- Host: GitHub
- URL: https://github.com/dmtrkovalenko/trololors
- Owner: dmtrKovalenko
- Created: 2021-10-01T18:56:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-01T19:02:53.000Z (over 4 years ago)
- Last Synced: 2025-06-18T13:27:07.231Z (12 months ago)
- Language: Rust
- Size: 3.53 MB
- Stars: 16
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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

```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`