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 hashes)
Built Distribution
calar-2.5.1-py3-none-any.whl
(5.7 kB
view hashes)