-
Notifications
You must be signed in to change notification settings - Fork 37
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
Some colours are grey #17
Comments
The detection run at install time was cached.
Beautiful, thanks! |
This is a problem again, at least on my system (linux, terminal, R 3.2.2 with github and CRAN versions of crayon). Can you reopen? Any idea how to detect regressions? |
I am not sure if this is a regression. But it could be. What does |
You're right, sorry for the false alarm -- my OSX system displays the colour correctly (reporting 256 for That's coming from Forcing the terminal type by running
gives the right number. Likewise,
prints the pink correctly. So while this is definitely a configuration issue, this suggests that this 8 colour reporting/256 colour capability configuration is typical. This SO answer might provide a less stringent test, as it seems likely that 256 colour support will be more common than 8 colour support this century 😄 |
Thanks for the links. The thing is, the method suggested in the SO answer does not work for me on OSX, in iterm. :/ I think if you know that your terminal supports 256 colors, you can just set |
What would happen if rather than getting the result of tput just assuming 256? Is there even an 8 colour terminal easily available to see how it looks? Being able to rely in >8 colours makes using the package a lot easier (otherwise all end users will have to set TERM, even if it's several dependencies deep). I can dig around and see what the node packages for this do if that's useful. Or you can keep the current behaviour, which I agree is probably safest. |
I have no idea.
Emacs is surely 8 color.
I can default to 256 if
This is what the most popular node package does: https://github.com/chalk/supports-color/blob/master/index.js So how about defaulting to 256 if |
In emacs, when forcing 256 colours with: crayon::make_style("hotpink", colors=256) I get unstyled output, which doesn't seem too tragic a failing. Looks like node is going with 8 colours with xterm. And apparently setting TERM is liable to cause unspecified things. What a mess. |
Please reopen if you have issues. |
The text was updated successfully, but these errors were encountered: