Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

devanshshukla99/Chromos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

   ____ _                                   
  / ___| |__  _ __ ___  _ __ ___   ___  ___ 
 | |   | '_ \| '__/ _ \| '_ ` _ \ / _ \/ __|
 | |___| | | | | | (_) | | | | | | (_) \__ \
  \____|_| |_|_|  \___/|_| |_| |_|\___/|___/
                                            

Build


Package for getting colored text output in Python.


Installation

  • With Wheel File
pip install Chromos\*.whl`
  • Building From Source
python setup.py install

Attributes Supported:

Text:

  • Bold (default=True)
  • Itallic (default=False)
  • Underline (default=False)
  • Blink (default=False)
  • Strikethrough (default=False)

Text Colors:

  • Black
  • Red
  • Green
  • Yellow
  • Blue
  • Purple
  • Cyan
  • White

Background Colors:

  • Black (default)
  • Red
  • Green
  • Yellow
  • Blue
  • Purple
  • Cyan
  • White

Usage

  • Use cstr function for the colored text,
  cstr(attributes, string)
  • Can also use individual color functions,
blue(color, string)
# Similarly for other color functions
  • For printing an error message
# Use error_info or error_info_b
error_info("Error occured!")
  • For printing an info message
# Use info or info_y
info("Just informing about the new release :P")

Example

Illustration of usage

import Chromos
o = Chromos.Chromos()
print(o.cstr("blue", "Hello World! *"))
print(o.blue("Hey Chromos! "))

Global Attributes

o.underline = True
print(o.cstr("yellow", "Good stuff!"))

o.itallic = True
o.strikethrough = True
print(o.cstr("red", "Alright, alright!"))

Local Attributes

print(o.cstr("yellow underline", "Cool!"))

print(o.cstr("yellow bgred bf", "Great!"))

Function For Printing an Error Message

o.error_info("This is an Error Msg!" )

Function For Printing an Info Message

o.info_y("This is an Info Msg!" )

About

Colored text output with a ton of attributes configuration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages