Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16 million (a.k.a Truecolor) support #7

Open
eljobe opened this issue Sep 17, 2017 · 1 comment
Open

16 million (a.k.a Truecolor) support #7

eljobe opened this issue Sep 17, 2017 · 1 comment

Comments

@eljobe
Copy link

eljobe commented Sep 17, 2017

First I'd like to say that I am a big fan of your rgbterm work. I have recently been working on developing a way to determine what level of color support a terminal emulator has. I have been hacking together https://github.com/eljobe/terminal (although, maybe it should have a less collision-prone package name.)

I'm wondering if you would be interested in a pull request which uses that functionality to determine what level of color is supported by the terminal, and then automatically, inside the rgbterm methods either:

  • Use the full 16 million colors of Truecolor (i.e. not convert to the 256 color codes) if Truecolor is supported.
  • Use the 256 color map (i.e. rgbcolor's current behavior) if 256 colors are supported.
  • Convert even further down to 16 colors (ansi or basic color) if only 16 colors are supported (e.g. Terminal.app that is the default terminal on most Macs.)
  • Totally ignore the escape codes, if no color support is found in the terminal (obviating the need for programmatically enabling/disabling color)

Let me know what you think. Otherwise, I'll probably just end up ripping off the API you've provided to your users and wrapping calls to rgbcolor to implement 256 color support.

@aybabtme
Copy link
Owner

@eljobe sounds good to me, I'd be happy to merge that PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants