The text colorizer everyone needs!
Project description
The text colorizer everyone needs!
import calar
Example Usage
calar.init() # Optional
blue_color = calar.get('blue')
# blue_color = calar.Fore.BLUE
# blue_color = calar.get('blue', 'fore')
print(blue_color + 'Hello World!')
calar.deinit() # Optional
More Example Usage
blended = calar.blend(calar.Fore.BLUE, calar.Style.BOLD)
print(blended + 'Hello World!')
Create Gradients
blue_gradient = calar.gradient('blue')
print(blue_gradient + 'Hello World!')
back_blue_gradient = calar.gradient('blue', 'back')
print(back_blue_gradient + 'Hello World!')
Apply Gradients to Text
gradient = calar.gradient('blue')
gradient_text = calar.gradientify('Hello World!', gradient)
print(gradient_text)
Colorize Code
code = '''
import numpy as np
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n - 1)
print(factorial(5))
'''
colored_code = calar.code(code, 'python', 'friendly')
print(colored_code)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
calar-2.5.1.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
calar-2.5.1-py3-none-any.whl
(5.7 kB
view details)
File details
Details for the file calar-2.5.1.tar.gz.
File metadata
- Download URL: calar-2.5.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7abae519eb56595c3a757d2ef60706660e33973c0ec613deb1f324021960e750
|
|
| MD5 |
7617b79eabafc87a57e6fc7b8bca4ff3
|
|
| BLAKE2b-256 |
7dfb33d6caf329776b55456f569f012e5960c14681184bad5a013c8559829866
|
File details
Details for the file calar-2.5.1-py3-none-any.whl.
File metadata
- Download URL: calar-2.5.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4d3ead2b1e725aa9a399f76b6c076926197f4613c4d618bb5cdd68c569eaace
|
|
| MD5 |
425a5395d667d88c0a21e7d5ba713ca3
|
|
| BLAKE2b-256 |
0e3ec0b29ffc0d43662bf64a7cf6e85eba5298f3a7e0ad97984275aaad1b33e5
|