Skip to main content

coolours-logo

Coolours

A Python Module To Make Text Styling Easy

Made By Alex Hawking

Installation

With Pip

Install with:

pip install coolours

or

pip3 install coolours

With wget

Wget must be installed

cd ~/Library/Python/3.7/lib/python/site-packages && wget https://raw.githubusercontent.com/Handmade-Studios/coolours-module/master/coolours/coolours.py && cd ~

Probably easier to copy and paste that ^

Usage

Importing

Import coolours using:

from coolours.colour import *

You can import with

import coolours.colour

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

Alignment

  • Center

To center text use:

print(center('yourtext'))
  • Right

To align text to the right use:

print(right('yourtext'))
  • With Colour

To use alignment with colour:

print(colour('style', 'textcolour', 'bgcolour') + center('yourtext'))

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)

Updating

To update use:

pip install --upgrade coolours

Or:

pip3 install --upgrade coolours

List of Colours

Coolours 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

Alignments

  • Right
  • Center

Future

More colours and styles coming soon. Will add some sort of fancy text.

Release files for coolours 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coolours 0.6
File Size Uploaded
coolours-0.6.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coolours 0.6
File Interpreter ABI Platform
coolours-0.6-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / coolours-0.6.tar.gz

Download URL coolours-0.6.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8b3d5b9b8204003837461f79638b5fd0cd65113a2bf38e348ff8479d3ec9d98f
BLAKE2b-256 checksum
How to use checksums
1905a1766ee0e58ccd527ebbe4d9c329112009debb65514d6f82419d7030f9c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / coolours-0.6-py3-none-any.whl

Download URL coolours-0.6-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dc0f2699d7746e9b5e4cce15d046f73b89ded928fa88ad5237dd47c3853d271
BLAKE2b-256 checksum
How to use checksums
cc12063b20edf1273547e138eac12a81251cb1af6d0ab1877ae00acfb57b54a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.6 This release

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page