Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Color Console Output

Dhruvan edited this page Oct 20, 2022 · 2 revisions

In Versace there is native support for color printing, this is thanks to the python module called rich

How to output with color?

out < (string) < (color)

or

out < "[color](text)" < (style)
  • In Versace you can also justify your text by doing this:
out < (string) < (color) < (justify type)
  • These are the folloing arguments you can use for styles, endtypes and more:
Colors Styles Endtypes Alignments
black bold endl left
red dim newl center
green italic tab right
yellow underline space justify
blue blink rw
magenta reverse null
cyan hidden
white strikethrough
bright_red
bright_green
bright_yellow
bright_blue
bright_magenta
bright_cyan
bright_white
bold red
bold green
bold yellow
bold blue
bold magenta
bold cyan
bold white
bold black
  • Definitions of Endtypes:
Endtype Python Equivalent Description
endl end='' No newline
newl end='\n' Newline
rw end='\r' Carriage return
space end=' ' Space
tab end='\t' Tab
nul end='\0' Null character
  • Here are some examples of printing with arguments:
out < "Hello" < red < center < newl
out < "Hello" < bold
out < "Hello" < center < tab
out < "Hello" < center < endl < green
  • You can also print without arguments