• Stars
    star
    1,460
  • Rank 31,032 (Top 0.7 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 6 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Print awesomely in terminals.

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.

More Repositories

1

roop

one-click face swap
Python
24,347
star
2

XSStrike

Most advanced XSS scanner.
Python
12,523
star
3

Photon

Incredibly fast crawler designed for OSINT.
Python
10,404
star
4

Arjun

HTTP parameter discovery suite.
Python
4,747
star
5

AwesomeXSS

Awesome XSS stuff
JavaScript
4,605
star
6

sd-webui-roop

roop extension for StableDiffusion web-ui
Python
3,125
star
7

Smap

a drop-in replacement for Nmap powered by shodan.io
Go
2,708
star
8

Striker

Striker is an offensive information and vulnerability scanner.
Python
2,163
star
9

be-a-hacker

roadmap for a self-taught hacker
1,694
star
10

ReconDog

Reconnaissance Swiss Army Knife
Python
1,685
star
11

Hash-Buster

Crack hashes in seconds.
Python
1,639
star
12

Corsy

CORS Misconfiguration Scanner
Python
1,213
star
13

Silver

Mass scan IPs for vulnerable services
Python
993
star
14

uro

declutters url lists for crawling/pentesting
Python
966
star
15

Diggy

Extract endpoints from apk files.
Shell
847
star
16

Decodify

Detect and decode encoded strings, recursively.
Python
841
star
17

Blazy

Blazy is a modern login bruteforcer which also tests for CSRF, Clickjacking, Cloudflare and WAF .
Python
800
star
18

Breacher

An advanced multithreaded admin panel finder written in python.
Python
679
star
19

goop

Google Search Scraper
Python
561
star
20

ote

Generate Email, Register for anything, Get the OTP/Link
Python
561
star
21

Zen

Find emails of Github users
Python
522
star
22

Parth

Heuristic Vulnerable Parameter Scanner
Python
512
star
23

Orbit

Blockchain Transactions Investigation Tool
Python
506
star
24

JShell

JShell - Get a JavaScript shell with XSS.
Python
498
star
25

MyPapers

Repository for hosting my research papers
Python
492
star
26

Bolt

CSRF Scanner
Python
490
star
27

Cloak

Cloak can backdoor any python script with some tricks.
Python
475
star
28

nano

Nano is a family of PHP web shells which are code golfed for stealth.
PHP
427
star
29

sqlmate

A friend of SQLmap which will do what you always expected from SQLmap.
Python
406
star
30

SubGPT

Find subdomains with GPT, for free
Python
315
star
31

dump

Stuff that doesn't deserves its own repository.
Python
293
star
32

hardcodes

find hardcoded strings from source code
Python
272
star
33

Quark

Quark is a data visualization framework.
JavaScript
211
star
34

proxify

A python module for dumping usable proxies.
Python
150
star
35

Predator

Anti-Automation System
CSS
118
star
36

Shiva

Improved DOS exploit for wordpress websites (CVE-2018-6389)
Python
109
star
37

velocity

DNS caching for humans
Python
86
star
38

rewise

Google auto-complete wrapper
Python
74
star
39

zetanize

HTML form parser for humans.
Python
72
star
40

ifnude

nudity detector that works
Python
67
star
41

Locky

Locky generates "really" strong yet easy to remember passwords.
Python
59
star
42

Entropy

Entropy is a (prototype) WAF driven by maths.
Python
53
star
43

fonetic-go

golang implementation of fonetic (https://github.com/s0md3v/fonetic)
Go
38
star
44

meta

Explains and tests HTTP response headers
Python
38
star
45

fonetic

assess pronounciblity of text
Python
32
star
46

shades

Shell
27
star
47

wl

convert case style of words
Go
19
star
48

s0md3v.github.io

my personal blog
SCSS
12
star
49

s0md3v

8
star
50

.github

my default .github files
5
star
51

BG3-Mutant

Mod for Baldur's Gate 3 that adds a Mutant class to the game.
2
star