playing with color in powershell python

Here's a bit I'm working on.  I've discovered I love doing Ascii. 
Examples of how to use the color changing escape. 
I got a table from StackOverflow:
https://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python

the charts are way at the bottom. So far accurate for me. 


def prettyjunk(self):
# 1 is bold, 0 is plain, 2 is dull
text_red = '\x1b[1;31;40m'
stop_color = '\x1b[0m'
text_blue = '\x1b[1;34;40m'
text_green = '\x1b[1;32;40m'
text_purple = '\x1b[1;35;40m'
text_lightblue = '\x1b[1;36;40m'
text_white = '\x1b[1;37;40m'
a_green_at = (f"{text_green}@{stop_color}")
a_red_at = (f"{text_red}@{stop_color}")
print(f"{text_red} This should be Red. {stop_color} ")
print(f"{text_blue} This should be Blue. {stop_color} ")
print(f" {text_green} This should be Green. {stop_color} ")
print(f" {text_purple} This should be Purple {stop_color} ")
print(f" {text_lightblue} This should be Light blue {stop_color} ")
print(f" {text_white} This should be white. {stop_color} ")

print((f"{text_purple}> {stop_color}" + f"{text_green}< {stop_color}") * 12)
print((f"{a_green_at}" + f"{a_red_at}") * 23)
print(f"{a_green_at}"*4,f"{a_red_at}"*19)
print(f"{a_green_at}"*5,f"{a_red_at}"*18)
print(f"{a_green_at}"*6,f"{a_red_at}"*17)
print(f"{a_green_at}"*7,f"{a_red_at}"*16)
print(f"{a_green_at}"*8,f"{a_red_at}"*15)
print(f"{a_green_at}"*9,f"{a_red_at}"*14)

Comments

Popular posts from this blog

JavaScript Ascii animation with while loops and console.log

playing with trigonometry sin in pygame