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 coloralf

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 :

c.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.2.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.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coloralf-0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 8970e8df5ab021e928f9bd8c9128c46f501497280d9f0bd84d0082fba346e29c
MD5 6ca083711f7566a9d589f707b221ab2a
BLAKE2b-256 424d3157dda6dadbf3f3bb50bb0db80a98efe3cf3be7e683417662ff803b38cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coloralf-0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9a58065452e034b8fc27c12eede738a215e0a2b0926af7f73e76532bbfd04cc7
MD5 ba466099fcf2be850548008e60d139c3
BLAKE2b-256 bfa70c0cb61261052217cfd0f8bef8ed34b1ceb22ce6ead5924a73e2a5b3e9bc

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