All Projects → s0md3v → Huepy

s0md3v / Huepy

Licence: gpl-3.0
Print awesomely in terminals.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Huepy

enrich
Enrich adds few missing features to the wonderful rich library.
Stars: ✭ 20 (-98.59%)
Mutual labels:  colorama, terminal-colors
TermColor
🎨 Effortlessly generate color-schemes for terminal emulators by a single drop of an image!
Stars: ✭ 40 (-97.19%)
Mutual labels:  terminal-colors
vulpw
A Password Vulnerability checker
Stars: ✭ 14 (-99.01%)
Mutual labels:  colorama
go-windows-terminal-sequences
Enable support for Windows Terminal Colors
Stars: ✭ 27 (-98.1%)
Mutual labels:  terminal-colors
tamcolors
tamcolors is a terminal game library which supports multiplayer and audio. tamcolors gives a buffer which lets the user set the character, foreground color and background color which can draw at a stable FPS of 25 on all supported console.
Stars: ✭ 24 (-98.31%)
Mutual labels:  terminal-colors
inquire
a collection of common interactive command line user interfaces
Stars: ✭ 20 (-98.59%)
Mutual labels:  terminal-colors
wtcolor
A tool that can change color theme of Windows Terminal conveniently and easily!
Stars: ✭ 25 (-98.24%)
Mutual labels:  terminal-colors
sourcerer
read code like a wizard. a 16bit color scheme for hackers
Stars: ✭ 136 (-90.43%)
Mutual labels:  terminal-colors
pystyle
The source of my Python library, pystyle.
Stars: ✭ 158 (-88.88%)
Mutual labels:  colorama
pywal-web
Web interface for pywal
Stars: ✭ 36 (-97.47%)
Mutual labels:  terminal-colors
terco
A small collection of terminal colorschemes.
Stars: ✭ 12 (-99.16%)
Mutual labels:  terminal-colors
hax
Zero-config Hacky Hackpecker setup
Stars: ✭ 16 (-98.87%)
Mutual labels:  terminal-colors
File-LsColor
Colorize input filenames just like ls(1) does
Stars: ✭ 33 (-97.68%)
Mutual labels:  terminal-colors
SomaFM
A simple Python 3.x terminal interface for streaming SomaFM
Stars: ✭ 27 (-98.1%)
Mutual labels:  terminal-colors
bliss-zsh
A delicate Zsh theme that injects color without overwhelming your workspace
Stars: ✭ 20 (-98.59%)
Mutual labels:  terminal-colors
Indicators
Activity Indicators for Modern C++
Stars: ✭ 1,838 (+29.35%)
Mutual labels:  terminal-colors

Hue

Hue Logo

Hue provides a minimal and powerful interface to print colored text and labels in the terminal.\ It works with Python 2 as well as Python 3.

What makes hue better than other coloring libraries? Here's a comparison.

Supported Stuff

Following styles are supported

Hue Styles

Following colors are supported

Hue Colors

Following labels are supported

Hue Labels

Installation

You can install hue with pip as follows:

pip install huepy

or with easy_install:

easy_install huepy

Usage

First of all, import everything that Hue has to offer as follows:

from huepy import *

Printing colored text is as simple as doing

print(red('This string is red'))

Easy right? But what if you want to print italic text? You can simply do this

print(italic('This string is in italic'))

You can also combine styles and colors

print(bold(red('This string is bold and red')))

Output: Output Examples

And what is the use of those labels?
I have been using these labels in projects as a minimal output schema.
If some error occured in your program or something else bad happened you don't need to print the whole line in red. With hue, you can simply do this

print(bad('An error occured.'))

Take a look at the output of all the labels Label Examples

List of all colors

white, grey, black, green, lightgreen, cyan, lightcyan, red, lightred,
blue, lightblue, purple, light purple, orange, yellow

List of all styles

bold, bg, under, strike, italic

List of all labels

info, que, run, bad, good

Note: Windows versions below windows 10 do not support ANSI escape sequences so the colors will not be printed in command prompt.

Why hue

Because its awesome! Lets print a red colored string in popular coloring libraries:

  • Colorama
from colorama import Fore
print(Fore.RED + 'This string is red')
  • Termcolor
import sys
from termcolor import colored, cprint
print(colored('This string is red', 'red'))
  • Hue
from hue import *
print(red('This string is red'))

Here's comparison table:

Hue Colorama Termcolor
Compatibility Unix & Windows 10 Unix & Windows Unix
Ease of use 10/10 4/10 5/10
Bright Colors Yes No No

Note: Colorama and Termcolor print bold styled strings when asked for bright colored strings. On the other hand, Hue supports both bright and bold strings. Also the Ease to use ratings are a result of my own experience and may differ for others.

Contribution

The only thing I think Hue needs is better windows compatibility. So if you can start a pull request for windows support that would be great. Additional colors and labels will be appreciated too.

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