Skip to main content

No project description provided

Project description

coloralf

Info :

This package is all you need for transform and colored your print in the console. It's easy and quick to use, and can be ameliarate the clearness of your output. (In the followed informations, sorry for my awful english .....)

Installation & importation :

Install with :

pip install coloraf 

Importation (as c is not obligatory but this make coloralf easy to use) :

import coloralf as c

All transformation :

For see all transformation, you can execute :

c.test()

I write all in details at the end of this description.

Usage :

You can mainly use coloralf in two way : in a f-string or as print function.

In a f-string :

It's a easy way to make print with different colors. For exemple : For write "Ce chat mignon s'apelle Chouquette" with :

  • Ce in red
  • chat with a yellow background
  • mignon in italic
  • Chouquette in underline and light magenta You can :
print(f"{c.r}Ce{c.d} {c.by}chat{c.d} {c.ti}mignon{c.d} s'apelle {c.m}{c.tu}Chouqette{c.d}")

You can change color, back, etc., and combine transformation. (You can notice the c.d, is for delete/reset all transformation)

In print function :

It's a quick way to use coloralf. You can directly print a sentence (str) with the wanted transformation : just need to add 'f' before the transformation-code. Excemple : For write "Super librairie" in red :

c.fr("Super librairie")

If you want several transformations, you can use the f function : For write "Encore un exemple ..." in underlined (tu), red (r), blink (tb), with green back :

f("Encore un exemple ...", 'tu.r.tb.bg')

It's just a combinaison of all transformation-codes join by a .

List of all transformations :

  • FOR PRINT FUNCTION : add a f before the transformation-code
  • FOR COLOR : a lighter color, add a l before the color-code
  • FOR FORMAT : to reset, replace the t by r
  • FOR RESET ALL : c.d or c.ra or c.rall

Font Colors :

  • (c.k) Black (for exemple light black : (c.lk))
  • (c.r) Red
  • (c.g) Green
  • (c.y) Yellow
  • (c.b) Blue
  • (c.m) Magenta
  • (c.c) Cyan
  • (c.w) White
  • (c.rfc) Reset font color

Background Colors :

  • (c.bk) Black (for exemple light black : (c.blk))
  • (c.br) Red
  • (c.bg) Green
  • (c.by) Yellow
  • (c.bb) Blue
  • (c.bm) Magenta
  • (c.bc) Cyan
  • (c.bw) White
  • (c.rbc) Reset back color

Format transformations :

  • (c.ti0) Week intensity
  • (c.ti1) Normal intensity
  • (c.ti2) Strong intensity
  • (c.ti) Italic
  • (c.tu) Underline
  • (c.tu2) Double underline
  • (c.tb) Blink
  • (c.th) Hide
  • (c.tc) Cross

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

coloralf-0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

coloralf-0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file coloralf-0.1.tar.gz.

File metadata

  • Download URL: coloralf-0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for coloralf-0.1.tar.gz
Algorithm Hash digest
SHA256 cdc3a6e907a834349dd803023f0e296e66a6c981a3d7d52e959c8a829d69c07c
MD5 36b882a6287d85d72176aa874d5629a6
BLAKE2b-256 c1010996316e356e94bd8f8b4dff9f4964767c1f7794cb92eaf63e9e3372e222

See more details on using hashes here.

File details

Details for the file coloralf-0.1-py3-none-any.whl.

File metadata

  • Download URL: coloralf-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for coloralf-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f8df7df86a986b33de5bf68b8ef1c7ae5866d1e5bf8f460b4e6868403fe91e0
MD5 bb9db1da118c7e50478eb1018666da5b
BLAKE2b-256 584c03627baa02239400e2c8a71a9e7b671597ff013580a4e87e841323fc6fc6

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