Skip to main content

A module to print a strings in a given colour, with a given colour background

Reason this release was yanked:

experimental

Project description

Polychromy

PyPI - Version PyPI - Python Version Downloads PyPI - License

Description

Polychromy is a Python script to manipulate the color of text.

Features

  • Prints text of a specified colour in a specified colour background.
  • Prints out Hex and RGB values of a given colour in a square of the given colour.

Latest Version 0.0.2

Table of Contents

Getting Started

Prerequisites

This script relies on the Python standard library and textlinebreaker.

Installation

  • Install the package with pip
  pip install polychromy
  • Import the package in your program
  from polychromy import color_show

Usage

Calling the function color_show() inside your program will print a square of the color given as input to the function, and its HEX and RGB values.

Parameters

... to be completed ...

Examples

import sys
from polychromy import color_show

# If you run this program without any argument it asks you for a color and prints it out to the screen.
if len(sys.argv) == 1:

    color_in = input("Enter a colour: ")
    color_show(color_in)

# Giving a color as argument it prints it out directly to the screen
# Accepted values are: Name colors, HEX and RGB values.

else:
    color_show()

Contributing

If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository on GitHub.
  2. Clone the fork to your local machine.
  3. Create a new branch for your feature or bug fix.
  4. Make your changes and commit them.
  5. Push the changes to your fork on GitHub.
  6. Create a pull request to the original repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

polychromy-0.0.2.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

polychromy-0.0.2-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page