All Projects β†’ prashnts β†’ Hues

prashnts / Hues

Licence: mit
Colored terminal text made easy for Python and happiness.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Hues

Imgcat
It's like cat, but for images.
Stars: ✭ 577 (+67.25%)
Mutual labels:  cli, terminal, ansi, color
Rang
A Minimal, Header only Modern c++ library for terminal goodies πŸ’„βœ¨
Stars: ✭ 1,080 (+213.04%)
Mutual labels:  cli, terminal, ansi, color
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (+126.67%)
Mutual labels:  cli, terminal, ansi, color
Chalk
πŸ– Terminal string styling done right
Stars: ✭ 17,566 (+4991.59%)
Mutual labels:  cli, terminal, ansi, color
Chafa
πŸ“ΊπŸ—Ώ Terminal graphics for the 21st century.
Stars: ✭ 774 (+124.35%)
Mutual labels:  cli, terminal, ansi
Colorls
A Ruby gem that beautifies the terminal's ls command, with color and font-awesome icons. πŸŽ‰
Stars: ✭ 3,896 (+1029.28%)
Mutual labels:  cli, terminal, color
Nord Guake
An arctic, north-bluish clean and elegant Guake color theme.
Stars: ✭ 20 (-94.2%)
Mutual labels:  cli, terminal, color
Crossline
A small, self-contained, zero-config, MIT licensed, cross-platform, readline and libedit replacement.
Stars: ✭ 53 (-84.64%)
Mutual labels:  cli, terminal, color
Colorette
Easily set the color and style of text in the terminal.
Stars: ✭ 1,047 (+203.48%)
Mutual labels:  cli, terminal, ansi
Nord Konsole
An arctic, north-bluish clean and elegant Konsole color scheme.
Stars: ✭ 56 (-83.77%)
Mutual labels:  cli, terminal, color
Nord Terminal App
An arctic, north-bluish clean and elegant Terminal.app color theme.
Stars: ✭ 198 (-42.61%)
Mutual labels:  cli, terminal, color
Colorizeswift
Terminal string styling for Swift.
Stars: ✭ 253 (-26.67%)
Mutual labels:  terminal, ansi, color
Box Cli Maker
Make Highly Customized Boxes for your CLI
Stars: ✭ 115 (-66.67%)
Mutual labels:  cli, terminal, color
.tmux
πŸ‡«πŸ‡· Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❀️
Stars: ✭ 15,594 (+4420%)
Mutual labels:  cli, terminal, powerline
Mordant
Full-featured text styling for Kotlin command-line applications
Stars: ✭ 382 (+10.72%)
Mutual labels:  terminal, ansi, color
Xa
Beautiful & Customizable logger ❀️
Stars: ✭ 78 (-77.39%)
Mutual labels:  cli, terminal, color
Php Console Spinner
Colorful highly configurable spinner for php cli applications (suitable for async apps)
Stars: ✭ 225 (-34.78%)
Mutual labels:  cli, terminal, color
Nord Gnome Terminal
An arctic, north-bluish clean and elegant GNOME Terminal color theme.
Stars: ✭ 258 (-25.22%)
Mutual labels:  cli, terminal, color
Tmuxp
πŸ’» tmux session manager. built on libtmux
Stars: ✭ 3,269 (+847.54%)
Mutual labels:  cli, terminal
Consola
Elegant Console Logger for Node.js and Browser 🐨
Stars: ✭ 3,461 (+903.19%)
Mutual labels:  cli, terminal

Hues

This is the 90s and your terminal can display 16 glorious colors. Your Python scripts deserve the same color love. Hues makes printing to console in color easy. Just grab the package from PIP, and your monochromatic days will be a thing of past!

Preview

Build Status Test Coverage PyPI

Quickstart

Go, grab the latest version from PIP. Run:

pip install hues

Then, in your scripts, you can do this:

>>> import hues
>>> hues.log('Mission', 42)
>>> hues.info('Finding', 42)
>>> hues.error(41, 'is not', 42)
>>> hues.warn('We are distracted...')
>>> hues.info('Found', 24)
>>> hues.success('Close enough.')

Example

whoa!

Configuration

You can add a .hues.yml file in your projects, or your home directory, overriding the defaults. The configuration files are searched and loaded in this order:

  • Packaged configuration
  • User home directory
  • Current directory and all the parent directories

Check out the default configuration here. Currently there's a powerline theme shipped with the package which you can enable by updating theme value in configuration.

Creating your own prompts

hues makes it easy to create your own custom prompt formats with a Hue String. Hue string is a thin wrapper around Python strings adding a chainable syntax that's a joy to use!

>>> import hues
>>> print(hues.huestr(' 42 ').white.bg_blue.bold.colorized)

It does exactly what it says:

Example

The Hue string chained attributes use a deterministic pushdown automata for optimizing the attribute access, so the ANSI escaped strings are always optimal.

Colors

All 16 glorious ANSI colors are available for both background and foreground. Assorted text styles such as bold, italics and underline are also available. Too many colors? Worry not fam, go to town with reset attribute.

Todo

  • [ ] More Documentation.
  • [ ] Unicorns required.

Please contribute by opening issues, suggestions and patches.

If you like hues or use it in your project, I'd love to hear about it! Shout at me on tumblr or send me an email.

Back in my days, we didn't even have colors!

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].