mkaz / termgraph

a python command-line tool which draws basic graphs in the terminal
MIT License
3.15k stars 165 forks source link

Color codes are maybe wrong #77

Open AdityaTaggar05 opened 3 years ago

AdityaTaggar05 commented 3 years ago

I was just testing and running things with termgraph when I noticed that the colors of the graphs seemed a little off. I thought it might the color scheme of Windows Terminal. But on further checking, I found out that the color codes in colorama.Fore and the ones in termgraph are different. Below is the code I ran for checking it.

image

I hope you update the colors accordingly if needed.

cSquaerd commented 2 years ago

From peaking at the AVAILABLE_COLORS enum in termgraph.py, I think via colorama, its not using the true colors, but rather their ANSI formatting codes. In a 16 or 256 color terminal emulator, these colors can change slightly or greatly depending on your terminal's palette. Is your palette from your screenshot of Solarized, or a similar variant?

A possible fix, try your code and some termgraph tests with either the Tango, XTerm, or Linux Console palettes.