Skip to main content

A library that make your output colorful in python

Project description

Random Color library

CodeQL

https://user-images.githubusercontent.com/79264026/172701097-337571d8-23fd-45a1-8cdc-72b97acc0176.mp4

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


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)

Uploaded Source

Built Distribution

Rcolor-2.0.3-py3-none-any.whl (7.3 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