Skip to main content

A Python module to make text colouring easy.

Project description

Coolours

A Python Module To Make Text Colouring Easy

Made By Alex Hawking

Usage

Importing

Import coolours using:

from coolours.coolours import *

You can import with

import coolours.coolours

But that requires you to use print(coolours.colour('style', 'textcolour', 'backgroundcolour')), so I think it is easier to use the first method.

Colours

You use coolours within the print function as shown below:

print(colour('style', 'text-colour', 'background-colour') + 'your text')

Make sure you place the colours and styles within quotes

Default

To make the colours back to default after the coloured text add default to the end of the print function:

print(colour('style', 'text-colour', 'background-colour') + 'your text' + default)

List of Colours

Coolors contains the following colours:

Styles

  • none
  • bold
  • underline (not supported in all temrinals)
  • blink (not supported in all terminals)

Text Colours

  • none
  • black
  • red
  • green
  • yellow
  • blue
  • purple
  • cyan
  • white
  • brightblack
  • brightred
  • brightgreen
  • brightyellow
  • brightblue
  • brightpurple
  • brightcyan
  • brightwhite

Background Colours

  • none
  • black
  • red
  • green
  • yellow
  • blue
  • purple
  • cyan
  • white
  • brightblack
  • brightred
  • brightgreen
  • brightyellow
  • brightblue
  • brightpurple
  • brightcyan
  • brightwhite

Future

More colours and styles coming soon. Will also add a way to align text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for coolours, version 0.2
Filename, size & hash File type Python version Upload date
coolours-0.2-py3-none-any.whl (3.3 kB) View hashes Wheel py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page