Chalk - Terminal string styling done right

  •        42

Chalk comes with an easy to use composable API where you just chain and nest the styles you want.Chain styles and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that chalk.red.yellow.green is equivalent to chalk.green.

https://github.com/chalk/chalk

Tags
Implementation
License
Platform

   




Related Projects

cli-color - Colors and formatting for the console

  •    Javascript

Colors, formatting and other goodies for the console. This package won't mess with built-ins and provides neat way to predefine formatting patterns, see below. Styles will display correctly if font used in your console supports them.

node-draftlog - 📜 Create updatable log lines into the terminal, and give life to your logs!

  •    Javascript

It allows you to re-write a line of your log after being written. Just like post 'updating'. This is the building block for any dynamic element such as progress bars, loading status, animations, checkboxes and so on.It does that by keeping track of the current lines of code written through the stream, and moving the cursor up to the line of the LogDraft you created previously, and updating its content.

notty - A new kind of terminal

  •    Rust

notty is a virtual terminal like xterm, gnome-vte, sh, or rxvt. Unlike these programs, notty is not intended to emulate a DEC VT-series physical video terminal, or any other physical device. Instead, notty is an experimental project to bring new features to the command-line which would not have been possible for the physical terminals other terminals emulate. Current command-line tools have stagnated (if you prefer, 'stabilized') around the ECMA-48/ISO 6429/ANSI X3.64 escape code protocol, which is defined on the basis of the capabilities of 1980s video terminal devices. Essentially all terminals in use today are virtual terminals being run on devices which are significantly more capable than these ancient machines, and yet the terminal environment has not kept pace with these developments. The last revision of the ANSI escape code protocol was released in 1991.

chalk - Intuitive package for prettifying terminal/console output

  •    Go

Chalk is a go package for styling console/terminal output. The api is pretty clean, there are default Colors and TextStyles which can be mixed to create more intense Styles. Styles and Colors can be printed in normal strings (i.e. fmt.Sprintf(chalk.Red)), but Styles, Colors and TextStyles are more meant to be used to style specific text segments (i.e. fmt.Println(chalk.Red.Color("this is red")) or fmt.Println(myStyle.Style("this is blue text that is underlined"))).


rainbow - Ruby gem for colorizing printed text on ANSI terminals

  •    Ruby

Rainbow is a ruby gem for colorizing printed text on ANSI terminals. It provides a string presenter object, which adds several methods to your strings for wrapping them in ANSI escape codes. These codes when printed in a terminal change text attributes like text color, background color, intensity etc.

cfonts - Sexy fonts for the console

  •    Javascript

This is a silly little command line tool for sexy fonts in the console. Give your cli some love.To install the CLI app, simply NPM install it globally.

ansi_up - A javascript library that converts text with ANSI terminal codes into colorful HTML

  •    Javascript

ansi_up is a simple, easy to use library that provides a streaming API to transform text containing ANSI color escape codes into proper HTML. It can also transform any text that looks like a URL into an HTML anchor tag. This module is a single Javascript file with no dependencies. It is a UMD style module so it can be utilized in a browser, in node.js (CommonJS), or with AMD (require.js). The source code was compiled from TypeScript and its type description ships with the NPM. This code has been used in production since 2011 and is actively maintained.

Swiftline - Swiftline is a set of tools to help you create command line applications.

  •    Swift

Colorize helps styling the strings before printing them to the terminal. You can change the text color, the text background and the text style. Colorize works by extending String struct to add styling to it.

node-charm - ansi control sequences for terminal cursor hopping and colors

  •    Javascript

Use ansi terminal characters to write colors and cursor positions.Charm objects pass along the data events from their input stream except for events generated from querying the terminal device.

kleur - The fastest Node.js library for formatting terminal text with ANSI colors~!

  •    Javascript

Toggle color support as needed; kleur assumes it's always enabled. Any kleur method returns a String (when invoked, not chained). It's up to the developer to pass the output to destinations like console.log, process.stdout.write, etc.

colorama - Simple cross-platform colored terminal text in Python

  •    Python

Makes ANSI escape character sequences (for producing colored terminal text and cursor positioning) work under MS Windows. ANSI escape character sequences have long been used to produce colored terminal text and cursor positioning on Unix and Macs. Colorama makes this work on Windows, too, by wrapping stdout, stripping ANSI sequences it finds (which would appear as gobbledygook in the output), and converting them into the appropriate win32 calls to modify the state of the terminal. On other platforms, Colorama does nothing.

rang - A Minimal, Header only Modern c++ library for terminal goodies 💄✨

  •    C++

rang only depends on C++ standard library, unistd.h system header on unix and windows.h & io.h system headers on windows based systems. In other words, you don't need any 3rd party dependencies. rang is a single header-only library. Put rang.hpp in the include folder directly into the project source tree or somewhere reachable from your project.

colorette - Node.js library for colorizing text using ANSI escape sequences

  •    Javascript

Colorette is a Node.js library for colorizing text using ANSI escape sequences. Import the style functions you want to use.

terminal - Converts arbitrary shell output (with ANSI) into beautifully rendered HTML

  •    Go

Terminal is a Go library for converting arbitrary shell output (with ANSI) into beautifully rendered HTML. See http://en.wikipedia.org/wiki/ANSI_escape_code for more information about ANSI Terminal Control Escape Sequences. It provides a single command, terminal-to-html, that can be used to convert terminal output via STDIN, as well as via a simple web server.

Rainbow - Delightful console output for Swift developers.

  •    Swift

Rainbow adds text color, background color and style for console and command line output in Swift. It is born for cross platform software logging in terminals, working in both Apple's platforms and Linux. Thanks to the open source of Swift, developers now could write cross platform programs with the same language. And I believe the command line software would be the next great platform for Swift. Colorful and well organized output always helps us to understand what happens. It is really a necessary utility to create wonderful software.

xterm.js - A terminal for the web

  •    TypeScript

Xterm.js is a terminal front-end component written in JavaScript that works in the browser. It enables applications to provide fully featured terminals to their users and create great development experiences.

colorful - Terminal string styling done right, in Python :snake: :tada:

  •    Python

Note: on a Windows system it will install colorama as a dependency to ensure proper ANSI support. These days terminals not only support the ancient 8 ANSI colors but often they support up to 16 Million colors with true color. And if they don't support true color they might support the 256 ANSI color palette at least.