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.

Installation

You can install Rainbow via pip:

  • pip install rainbow_prompt

Usage

Importing the Module

from rainbow import cstring, rc_string

Printing Colored Text

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

Returning Colored Text

colored_text = rc_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 rainbow import cstring

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

GitHub Issues

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: rainbow_prompt-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 634278a320a2295b1d1e18c382a03e7f6a34bdfd4a2d37b7bacc5e9ce92138c0
MD5 141b4a87accc5125cec50260fdc99d7f
BLAKE2b-256 b46ecc917f593e8f144be7ec5fa6708c6911795e42ab12cd1e44769d4db2628c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rainbow_prompt-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a964c53f6894249d24243007dca7022d47e013287b2e2a00716fe8612872e58e
MD5 fb9eeedce64a72184f3d8c9d45deeb6a
BLAKE2b-256 7ca3691ebd4d184a916bfa9ee01b62aa5c0c561c18e003d273f488ea7b051542

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