Skip to main content

This package aims to facilitate and simplify the use of colors in the prompt with python.

Project description

Welcome to the Rainbow package!

Introduction

The Rainbow module provides functions to add color to text in the terminal or prompt.

This package aims to make it easier to use colors in the prompt with Python.

Say goodbye to those horrible-to-remember character sets that we had to use to insert colors into the prompt. With this module, coloring the prompt will be quick and easy.

This is a simple module, containing just two functions.

Installation

You can install Rainbow via pip:

  • pip install rainbow_prompt

Usage

Importing the Module

from rainbow import print_colored_string, return_colored_string

Printing Colored Text

print_colored_string("Hello, World!", "green")

Returning Colored Text

colored_text = return_colored_string("Hello, World!", "red")
print(colored_text)

Available Colors

The following color names are available:

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

Available Backgrounds:

  • bg_black
  • bg_red
  • bg_green
  • bg_yellow
  • bg_blue
  • bg_magenta
  • bg_ciano
  • bg_white

Available Styles:

  • style_negrito
  • style_sublinhado
  • style_invertido

Note: Make sure to use these color names exactly as specified.

Example

from ColoredPrompt import print_colored_string

print_colored_string("This is a colored prompt.", "blue")
print_colored_string("Error!", "red")
print_colored_string("Warning!", "yellow")

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

rainbow_prompt-0.0.2.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rainbow_prompt-0.0.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file rainbow_prompt-0.0.2.tar.gz.

File metadata

  • Download URL: rainbow_prompt-0.0.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.0 Windows/11

File hashes

Hashes for rainbow_prompt-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d6cdc3fefe0c82ed506824242153f22e2e6e63a1111e44a21904ab5a9b2fd759
MD5 bfb5f5d58fcd4bf23f664eb537ac6f8b
BLAKE2b-256 7fde0a6a20ae028b5bc331ba7b7366dbfa7b143f5802936d675a41c85548e12e

See more details on using hashes here.

File details

Details for the file rainbow_prompt-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: rainbow_prompt-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.0 Windows/11

File hashes

Hashes for rainbow_prompt-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bdaf74acc2d31973e422b24e29ac91147354e37de870340d360f49cd26ac3435
MD5 4893283bd99a075024ff3064c599799c
BLAKE2b-256 338cc60322e2316f9941fba7ded5a6981f1cd2477cad3f6cb2bba9f31aa21559

See more details on using hashes here.

Supported by

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