cansid
cansid copied to clipboard
Fix color char not getting the correct style
Hi, the library does not return correct colors and this is an attempt at fixing it.
If I use the style value from color_char it fails, but the one from cansid_state is fine.
I believe that the result is just not updated with the style in one particular case, please check the patch.
The color codes which I test with are listed below.
#define red "\033[0;31m"
#define green "\033[0;32m"
#define yellow "\033[0;33m"
#define blue "\033[0;34m"
#define magenta "\033[0;35m"
#define cyan "\033[0;36m"
#define white "\033[0;37m"
#define bright_red "\033[1;31m"
#define bright_green "\033[1;32m"
#define bright_yellow "\033[1;33m"
#define bright_blue "\033[1;34m"
#define bright_magenta "\033[1;35m"
#define bright_cyan "\033[1;36m"
#define bright_white "\033[1;37m"
#define nocolor "\033[0m"