Skip to main content

Beautify your command line interfaces

Project description

image

Install:

pip install iridi

Usage:

from iridi import *

# Create gradient text
# iridi(message, colors, options)

iridi("This is an example message. Colorful, huh?", ["#8A2387", "#E94057", "#F27121"], bold=True)

The above should result in this:

image

Options:

The array can be an array of hex strings, or objects with r, g, and b values. This...

# This works:
iridi("Try it with RGB objects!", ["#7350b3", "#2ebf91"])

# So does this:
iridi("Try it with hex values!", [{"r": 250, "g": 0, "b": 100}, {"r": 60, "g": 255, "b": 0}])

...results in the following:

image

Want the output in bold? No problem, just add bold=True as the third argument to the function (shown in examples above).

Presets

There are included presets when importing the module, access them by doing presets.[name]. Example:

from iridi import *

iridi("Nice preset!", presets.wiretap)

image

If you'd like to contribute or add preset gradients to this project, feel free to fork this and make a PR!

If you end up using this or think it's cool, why not drop a :star:? It means a lot :)

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

iridi-1.0.1.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

iridi-1.0.1-py3-none-any.whl (15.8 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