(percent: number)
| 17 | * Converts a decimal between zero and one to TerminalKit color code |
| 18 | */ |
| 19 | export const percentToColor = (percent: number): string => |
| 20 | percent > 0.7 ? '^G' : percent > 0.5 ? '^Y' : percent > 0.3 ? '^y' : '^r'; |
| 21 | |
| 22 | /** |
| 23 | * Draws a coloured bar of specified width |