Colored board (#59)

* New flag -c to use colors in the cli board view

* Error handeling

* Fix formatting

* Extracted ANSI escape codes into a different file

* Fixed formatting
This commit is contained in:
Ebbe Steenhoudt 2021-12-08 10:43:40 -08:00 committed by GitHub
parent 142a5a6ecf
commit ba855a8ab1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 77 additions and 11 deletions

14
cli/commands/colors.go Normal file
View file

@ -0,0 +1,14 @@
package commands
//ANSI escape codes to be used in the color output of the board view
const (
TERM_RESET = "\033[0m"
TERM_BG_GRAY = "\033[48;2;127;127;127m"
TERM_BG_WHITE = "\033[107m"
TERM_FG_GRAY = "\033[38;2;127;127;127m"
TERM_FG_LIGHTGRAY = "\033[38;2;200;200;200m"
TERM_FG_FOOD = "\033[38;2;255;92;117m"
TERM_FG_RGB = "\033[38;2;%d;%d;%dm"
)