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.
Languages:
* python3Supported 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 |
Docker pull,build & run:
# pull:
docker pull docker.io/yasserbdj96/hexor:latest
# build:
docker build -t docker.io/yasserbdj96/hexor:latest .
# run:
docker run -e T="hex" -e TEXT="Text is red" -e FC="#ff0000" -i -t docker.io/yasserbdj96/hexor:latest
# OR
docker run -e T="hex" -e TEXT="Text is red and background is blue" -e FC="#ff0000" -e BG="1a73e8" -i -t docker.io/yasserbdj96/hexor:latest
Local Docker build & run:
# build:
docker build -t hexor:latest .
# run:
docker run -e T="hex" -e TEXT="Text is red" -e FC="#ff0000" -i -t hexor:latest
# OR
docker run -e T="hex" -e TEXT="Text is red and background is blue" -e FC="#ff0000" -e BG="1a73e8" -i -t hexor:latest
Github Packages pull,build & run:
# pull:
docker pull ghcr.io/yasserbdj96/hexor:latest
# build:
docker build -t ghcr.io/yasserbdj96/hexor:latest .
# run:
docker run -e T="hex" -e TEXT="Text is red" -e FC="#ff0000" -i -t ghcr.io/yasserbdj96/hexor:latest
# OR
docker run -e T="hex" -e TEXT="Text is red and background is blue" -e FC="#ff0000" -e BG="1a73e8" -i -t ghcr.io/yasserbdj96/hexor:latest
Python Package Installation:
pip install hexor
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.
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>")
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:
## 0.0.11 [25-07-2022]
- Fix bugs.
## 0.0.10 [26-02-2022]
- Fix bugs.
## 0.0.8 [26-02-2022]
- Delete pipincluder pakage.
- Fix bugs.
## 0.0.7
- Fix Bugs.
## 0.0.6
- fix bugs.
- new build.
## 0.0.5
- Import pakages by pipincluder.
- Fix bugs.
## 0.0.4
- Fix bugs.
## 0.0.3
- Fix bugs.
## 0.0.2
- Fix bugs.
- Add RGB type.
## 0.0.1
- First public release.
all posts #yasserbdj96
,all views my own.
Project details
Release history Release notifications | RSS feed
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.11.tar.gz
(5.0 kB
view hashes)
Built Distribution
hexor-0.0.11-py3-none-any.whl
(4.6 kB
view hashes)