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 color support in web console. #215

Open
Et7f3 opened this issue Nov 24, 2019 · 1 comment
Open

Add color support in web console. #215

Et7f3 opened this issue Nov 24, 2019 · 1 comment

Comments

@Et7f3
Copy link

Et7f3 commented Nov 24, 2019

In ocsigen/js_of_ocaml#928 is_tty return false when used in browser, thus pastel doesn't output color in web console.

Chrome can use ansi color . I have opened a issue in caniuse repo to see if it is widely supported.

A other approch is to use css in console. Examples can be found in this SO thread or in Facebook/Discord website web openning dev tool. From SO css support is support from a long time in firefox and also supported in chrome.

@bandersongit
Copy link
Contributor

I'm very interested to see what the broader browser support is. In the short term you could have some custom logic to check for Chrome and use Pastel.setMode(Pastel.Terminal) to override the mode that Pastel detects by default

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