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, enter this command in your terminal:
pip install Rcolor==2.0.0
features
- Change front color
- Change background color
- Change font (style)
- Change front color with background color at the same time
- Change front color with font at the same time
- Change background with font at the 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 Rcolor
Rcolor.<Module Name>
# Easier way
from Rcolor import <Module Name>
# For importing all modules (Not recommended):
from Rcolor import *
Important tip
cmd can't support all colors so it's better to use :
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
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
import Rcolor
print(Rcolor.color('Hello, World!'))
print(Rcolor.windows_color("Hello, World"))
Changing Background color
Make Sure to check Important tip
import Rcolor
print(Rcolor.background('Hello, World'))
print(Rcolor.windows_background('Hello, World'))
Changing font (style)
Make Sure to check Important tip
import Rcolor
Rcolor.style('Hello, World!')
Multiple capabilities
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 the 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.3.tar.gz
(7.6 kB
view hashes)
Built Distribution
Rcolor-2.0.3-py3-none-any.whl
(7.3 kB
view hashes)