Skip to main content

A small example package

Project description

Color_Console

This module is used to change the color of text and background of the python console designed for Windows Operating System.

"from Color_Console import Color_Console as C" statement is used to import color function from Color_Console module.

The permitted colors are:

  • black
  • blue
  • green
  • aqua
  • red
  • purple
  • yellow
  • white
  • gray
  • light blue
  • light green
  • light aqua
  • light red
  • light purple
  • light yellow
  • bright white

None of the arguement are case sensitive. Text color and background color cannot be the same.

"C.color ( text , bg , delay , repeat ) " is how this function can be called in a program.

color function is used to change the text color and background color of the python console.

"text" is used to specify the color of the text. "bg" is used to specify the color of the background.

Note that both background color and text color can't be the same.

If a list of permitted colors is passed to either "text" or "bg", the colors change in accordance to their position in the list. "delay" parameter is used to specify the time between two transitions.The default value is set to 0.67 seconds which can be changed. "repeat" parameter is used to specify the number of times the list of colors has to be repeated. The default value is -1 which makes the color transition occur indefinitely. "delay" and "repeat" are optional parameters.

Eg:

C.color( ['purple','black','red','blue'] , 'white' ) will result in text color changing from purple to black and so on with background color as white.

C.color( 'white' , ['purple','black','red','blue'] ) will result in background color changing from purple to black and so on with text color as white.

When the parameters of both "text" and "bg" are lists, the color transition is as follows:

Eg:

C.color(['green','black','red'],['blue','aqua','bright white'])

This will result in: green text with blue background black text with aqua background red text with bright white background in which the color transition takes 0.67 seconds and this is repeated indefinitely since repeat value is set to a default of -1. Note that if the size of two lists are different, an error will be thrown.

If the above code is not working try passing the arguements with their parameter names

Eg:

C.color(text=['green','black','red'],bg=['blue','aqua','bright white'],delay=0.5,repeat=5)

Developed by SAYAD PERVEZ

Email-Id : pervez2504@gmail.com

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

Color_Console-0.6.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

Color_Console-0.6-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file Color_Console-0.6.tar.gz.

File metadata

  • Download URL: Color_Console-0.6.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.0

File hashes

Hashes for Color_Console-0.6.tar.gz
Algorithm Hash digest
SHA256 61a615147623de83536e6cb0b039848944c56e8eea5e1795bf0a102715eec82b
MD5 b40af3c3e777b9360b4722b2ae756c5e
BLAKE2b-256 763f4cc35a77187f869d7987c0d77c937db00ac9a65bdd38b2a9c2bda71486c7

See more details on using hashes here.

File details

Details for the file Color_Console-0.6-py3-none-any.whl.

File metadata

  • Download URL: Color_Console-0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.0

File hashes

Hashes for Color_Console-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 37f9fe92360d88df491873e71e686da36fed117174a1ca636277d50b970e2b5b
MD5 47622d82ce57cdd7e54262cc5ca7be1d
BLAKE2b-256 4da5561577570056dbb4768d6327be9e2dfaf6ea60dff8788099b2370bfcb53e

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