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

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.1.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.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rainbow_prompt-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4c256d3f330c344a68de864a64098238e972b3d9db41fcbef774b1c21c27e2cb
MD5 c1a6bab1fbd2063517e437677108eb12
BLAKE2b-256 6c57668d3d5e448cd9d4d78a62c53257e35ba6af0e6279f721c8d4b977a565b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rainbow_prompt-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 230b1e99ef08794c83405507b99157162392c02d5ac7dbc8b85c48c7b07d8d3e
MD5 0264528aab440a34d5fd6a744d29c31d
BLAKE2b-256 0e7b99f210d31068495f39a8cfe7a4df0d3917ad1014d2a25f1d7be3935df797

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