Skip to content

Commit

Permalink
changed progress bar colors for better visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
gavin-ho1 committed Jul 30, 2024
1 parent e80ce00 commit da7c91f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions experiments/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ def prCyan(skk, end_str = '\n'): print("\033[96m{}\033[00m" .format(skk), end =
def prPink(skk, end_str = '\n'): print("\033[95m{}\033[00m" .format(skk), end = end_str)

#Helper function for status bar:
def loadingBar(num_complete : int, num_total : int, length : int, color : str = '\033[32m') -> str:
def loadingBar(num_complete : int, num_total : int, length : int, color : str = '\x1b[38;5;48m',alt_color : str = '\x1b[38;5;237m') -> str:
#Colors:
RESET = '\033[0m'

num_status = int(((num_complete/num_total)*length)//1)
return (color+'━'*num_status + RESET + '━'*(length-num_status))
return (color+'━'*num_status + RESET + alt_color+ '━'*(length-num_status)+RESET)

def bold(text : str, color = ''):
return('\033[1m'+text+'\033[0m'+color)

0 comments on commit da7c91f

Please sign in to comment.