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

Add 16 colour mode #167

Open
tombh opened this issue Aug 4, 2018 · 5 comments
Open

Add 16 colour mode #167

tombh opened this issue Aug 4, 2018 · 5 comments

Comments

@tombh
Copy link
Member

tombh commented Aug 4, 2018

Currently Browsh only supports 2 colours and 16 million colours. This is a little extreme, there are many, many scenarios in which 16 colour support would offer a massive improvement over either ugly banding lines or monochrome mode.

@jxyzn
Copy link

jxyzn commented Aug 7, 2018

88-color and 256-color modes would also be really nice to have.

@datamaskinen
Copy link

This is the most important to make it fully usable in a unix terminal ... keep up the good work dude

@tobimensch
Copy link
Collaborator

@jxyzn @datamaskinen
It looks like 256 color mode already works, if you set the following environment variable, before starting browsh:
export TCELL_TRUECOLOR=disable

This disables truecolor support explicitly, and it seems to fall back to 256 colors in my experiments inside a tmux session.

It does also get rid of the ugly vertical lines.

I'm not sure, if this causes any side issues, it would be great if you could give this workaround a go and report your experiences with it.

In theory this should make browsh usable on a huge range of terminals.

@tombh
Did you know this workaround?

@tobimensch
Copy link
Collaborator

tobimensch commented Aug 31, 2018

Even better, it looks like 16 color mode also is relatively easy to achieve.

I just had to replace "xterm-truecolor" in interfacer/src/browsh/browsh.go with "linux" in line 181.

This also makes browsh look usable on the bare linux console for the first time.

I don't know what showstoppers there may be that make this mode not really usable, but it's worthwhile to try this simple change.

It does also appear to lower bandwidth requirements, like it should.

brow.sh looked decent in this mode.

@tombh
Copy link
Member Author

tombh commented Aug 31, 2018

Nice detective work! This is such good news. It looks like we can really extend Browsh's compatibility with just a few updates :)

@tobimensch tobimensch mentioned this issue Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants