ntree colors

This commit is contained in:
Amber
2024-03-28 16:11:35 +01:00
parent 0f9789ed09
commit ceedc74ce9
4 changed files with 52 additions and 17 deletions

View File

@ -1,6 +1,6 @@
import os
# from colors import RED, YELLOW, GREEN, CYAN , BLUE, PURPLE
from src.colors import RED, YELLOW, GREEN, CYAN , BLUE, PURPLE
EMPTY_TREE_LINE_LENGTH = 160
EMPTY_TREE_LINE = ' ' * EMPTY_TREE_LINE_LENGTH
@ -71,3 +71,15 @@ def format(num, unit=None):
# human_number = num
return human_number, unit
def get_color_formatter(t):
'''
@param t string can be 'd', 'f', 'l', 'x'
'''
if t == 'd':
return BLUE
if t == 'x':
return GREEN
return None