A library that make your output colorful in python
Project description
Random Color library
This Python library makes your terminal output colorful ✨
On this Python library, you can access 255 kinds of color randomly!
There are just 15 colors for windows(cmd) users 😥
YouTube Tutorial 📹
installation
for installation, first make sure that you're in RandomColorlib folder, which setup.py exists,
then enter this command in your terminal:
pip install .
features
- Change front color
- Change background color
- Change font (style)
- Change front color with background color at same time
- Change front color with font at same time
- Change background with font at same time
- Change front color with background color and font at the same time
Usage
importing
For importing the library You can use the following:
# First way
import RandomColor
RandomColor.Rcolor.<Module Name>
# Easier way
from RandomColor import Rcolor
# For importing all modules:
from RandomColor.Rcolor import *
Important tip
cmd can't support all colors so it's better to use :
from RandomColor import Rcolor
print(Rcolor.windows_color("Hello, World")) # random color
print(Rcolor.windows_background("Hello, World")) # random background
- You can use the Auto part too, Which doesn't depend on the operating system and automatically detects the operating system
from RandomColor import Rcolor
print(Rcolor.auto_color("Hello, World")) # Automatic random color
print(Rcolor.auto_background("Hello, World")) # Automatic random background
Changing font color
Make Sure to check Important tip
from RandomColor import Rcolor
print(Rcolor.color('Hello, World!'))
print(Rcolor.windows_color("Hello, World"))
Changing Background color
Make Sure to check Important tip
from RandomColor import Rcolor
print(Rcolor.background('Hello, World'))
print(Rcolor.windows_background('Hello, World'))
Changing font (style)
Make Sure to check Important tip
from RandomColor import Rcolor
Rcolor.style('Hello, World!')
Multiple capabilities
from RandomColor import Rcolor
# Change front color with background color at the same time
Rcolor.color_background("Hello world")
# Change the front color with the font at the same time
Rcolor.color_style("Hello world")
# Change background with font at the same time
Rcolor.background_style("Hello world")
# Change front color with background color and font at the same time
Rcolor.color_background_style("Hello world")
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
Rcolor-2.0.0.tar.gz
(7.4 kB
view hashes)
Built Distribution
Rcolor-2.0.0-py3-none-any.whl
(6.9 kB
view hashes)