Skip to main content

Coloring texts and their backgrounds in command line interface (cli), with rgb or hex types.

Project description

hexor

Coloring texts and their backgrounds in command line interface (cli), with rgb or hex types.

Test on Ubuntu latest Test on Windows latest Test on MacOS latest pypi-setup Upload to PYPI Deploy static content to Pages CodeQL CodeFactor Supported Versions Visitors Open Source Stars Forks Watching GitHub contributors GitHub closed issues GitHub pull requests GitHub release (latest by date) GitHub commit activity GitHub last commit GitHub license Join the chat at https://gitter.im/yasserbdj96/hexor

Languages:

* python3

Supported Distributions:

Distribution Version Check Python Test Version Supported Status Everything works
Ubuntu 20.04.4 3.6, 3.7, 3.8, 3.9, 3.10 Yes Working Yes
Windwos 10.0.20348 3.6, 3.7, 3.8, 3.9, 3.10 Yes Working Yes
MacOS 11.6.6 3.6, 3.7, 3.8, 3.9, 3.10 Yes Working Yes
Android (termux) 10 3.6, 3.7, 3.8, 3.9, 3.10 Yes Working Yes

Python Package Installation:

# install from pypi:
❯ pip install hexor

# local install:
❯ git clone https://github.com/yasserbdj96/hexor.git
❯ cd hexor
❯ sudo python setup.py install

Run without installation:

❯ git clone https://github.com/yasserbdj96/hexor.git
❯ cd hexor
❯ python3 run.py <TYPE*> <TEXT*> <FC*> <BG>

# TYPE = hex/rgb.
# TEXT = Your text.
# FC   = Front Color.
# BG   = Background Color.
# *    = All inputs must be entered.

Script Usage:

from hexor import hexor

# Make options:
# p1=hexor(return_option,'type_of_color')

## return_option:[True,False]
### True for return results
### False for print results

## type_of_color:['hex','rgb']
### hex for hex colors for example : #ffffff, #cccccc
### rgb for rgb colors for example : (255,255,255), (250,12,0)

# default options is : hexor() = hexor(False,'hex')
p1=hexor(<OPTIONS>)

# To change text color only:
p1.c("<TEXT>","<FOREGROUND>")
	
# To change text color & background together:
p1.c("<TEXT>","<FOREGROUND>","<BACKGROUND>")

Script Examples:

from hexor import hexor

# Example:1
p1=hexor(False,"hex")
p1.c("Text is red","#ff0000")
p1.c("Text is red and background is blue","#ff0000","#1a73e8")

# Example:2
p2=hexor(True,"hex")
print(p2.c("Text is red","#ff0000"))
print(p2.c("Text is red and background is blue","#ff0000","#1a73e8"))

# Example:3
p1=hexor(False,"rgb")
p1.c("Text is red","255,0,0")
p1.c("Text is red and background is blue","255,0,0","26,115,232")

# Example:4
p1=hexor(True,"rgb")
print(p1.c("Text is red","255,0,0"))
print(p1.c("Text is red and background is blue","255,0,0","26,115,232"))

# Example:5
hexor().c("Text is red","#ff0000")# hexor().c("Text is red","#ff0000")
hexor(False,"rgb").c("Text is red and background is blue","255,0,0","26,115,232")

Screenshot:


Changelog History:

Click to See changelog History

Development By:

Developer / Author: yasserbdj96


License:

The content of this repository is bound by the following LICENSE.


Support:

If you like `hexor` and want to see it improve furthur or want me to create intresting projects , You can buy me a coffee

hexor by yasserbdj96
BTC: bc1q2dks8w8uurca5xmfwv4jwl7upehyjjakr3xga9



website . github . gitlab . linkedin . twitter . instagram . facebook . youtube . pypi . docker . telegram . gitter . e-mail . sponsor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hexor-0.0.13.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

hexor-0.0.13-py3-none-any.whl (8.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page