All Projects → marvinhagemeister → kolorist

marvinhagemeister / kolorist

Licence: MIT license
A tiny utility to colorize stdin/stdout

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to kolorist

log-utils
Basic logging utils: colors, symbols and timestamp.
Stars: ✭ 24 (-85%)
Mutual labels:  colors, ansi, ansi-colors
Ansi Colors
Easily add ANSI colors to your text and symbols in the terminal. ansi-colors is the official ansi styling library for gulp, and is used by hundreds of other projects, including mocha and enquirer.
Stars: ✭ 300 (+87.5%)
Mutual labels:  colors, ansi, ansi-colors
ansiart2utf8
Processes legacy BBS-style ANSI art (ACiDDraw, PabloDraw, etc.) to UTF-8. Escape codes and line endings are processed for terminal friendliness.
Stars: ✭ 32 (-80%)
Mutual labels:  ansi, ansi-colors
tiny-framework
A light wight easy to use RESTful apis framework for education & demo purposes. stripped down framework to the fundamental components that that every one would essentially need to (learn / make a demo application).
Stars: ✭ 13 (-91.87%)
Mutual labels:  minimal, tiny
Webpack Nano
A teensy, squeaky 🐤 clean Webpack CLI
Stars: ✭ 199 (+24.38%)
Mutual labels:  minimal, tiny
Cl Ansi Text
Enables ANSI colors for printing.
Stars: ✭ 30 (-81.25%)
Mutual labels:  colors, ansi-colors
Colorette
Easily set the color and style of text in the terminal.
Stars: ✭ 1,047 (+554.38%)
Mutual labels:  colors, ansi
Yui
Minimal vim color scheme
Stars: ✭ 93 (-41.87%)
Mutual labels:  minimal, colors
line
An easy to use golang package for stylizing terminal output
Stars: ✭ 26 (-83.75%)
Mutual labels:  colors, ansi-colors
leeks.js
Simple ANSI styling for your terminal
Stars: ✭ 12 (-92.5%)
Mutual labels:  colors, ansi
tinypool
🧵 A minimal and tiny Node.js Worker Thread Pool implementation (38KB)
Stars: ✭ 452 (+182.5%)
Mutual labels:  minimal, tiny
Termenv
Advanced ANSI style & color support for your terminal applications
Stars: ✭ 555 (+246.88%)
Mutual labels:  colors, ansi
Colorful
Terminal string styling done right, in Python 🐍 🎉
Stars: ✭ 456 (+185%)
Mutual labels:  colors, ansi
SSTMCSPGAAS
Stupidly Simple Tiny Minimal Coming Soon Page Generator As A Service
Stars: ✭ 23 (-85.62%)
Mutual labels:  minimal, tiny
concolor
Colouring template strings using tags with annotations 🎨
Stars: ✭ 35 (-78.12%)
Mutual labels:  colors, ansi
Minimp3
Minimalistic MP3 decoder single header library
Stars: ✭ 898 (+461.25%)
Mutual labels:  minimal, tiny
Ololog
A better console.log for the log-driven debugging junkies
Stars: ✭ 141 (-11.87%)
Mutual labels:  ansi, ansi-colors
Tinn
A tiny neural network library
Stars: ✭ 1,944 (+1115%)
Mutual labels:  ansi, tiny
kotter
A declarative, Kotlin-idiomatic API for writing dynamic console applications.
Stars: ✭ 355 (+121.88%)
Mutual labels:  ansi, ansi-colors
ansicolor
A JavaScript ANSI color/style management. ANSI parsing. ANSI to CSS. Small, clean, no dependencies.
Stars: ✭ 91 (-43.12%)
Mutual labels:  ansi, ansi-colors

kolorist

Tiny library to put colors into stdin/stdout 🎉

Screenshot of terminal colors

Usage

npm install --save-dev kolorist
import { red, cyan } from 'kolorist';

console.log(red(`Error: something failed in ${cyan('my-file.js')}.`));

You can also disable or enable colors globally via the following environment variables:

  • disable:

    • NODE_DISABLE_COLORS
    • TERM=dumb
    • FORCE_COLOR=0
  • enable:

    • FORCE_COLOR=1

On top of that you can disable colors right from node:

import { options, red } from 'kolorist';

options.enabled = false;
console.log(red('foo'));
// Logs a string without colors

You can also strip colors from a string:

import { red, stripColors } from 'kolorist';

console.log(stripColors(red('foo')));
// Logs 'foo'

License

MIT, see the license file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].