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

no colors printed by show_ansi_colors() #37

Closed
kforner opened this issue Jul 12, 2016 · 8 comments
Closed

no colors printed by show_ansi_colors() #37

kforner opened this issue Jul 12, 2016 · 8 comments

Comments

@kforner
Copy link

kforner commented Jul 12, 2016

Hi,

I just started testing crayon, and when I type:

> show_ansi_colors()
r:0 g:0 b:0 r:0 g:0 b:1 r:0 g:0 b:2 r:0 g:0 b:3 r:0 g:0 b:4 r:0 g:0 b:5 
r:0 g:1 b:0 r:0 g:1 b:1 r:0 g:1 b:2 r:0 g:1 b:3 r:0 g:1 b:4 r:0 g:1 b:5 
...

I have a text output with no color.

The other examples seem to work fine, I can print styled text.

moreover:

> num_colors()
[1] 256

I am in a gnome-terminal, on ubuntu with TERM=xterm,

> library(crayon)
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux stretch/sid

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] crayon_1.3.2
@gaborcsardi
Copy link
Collaborator

gaborcsardi commented Jul 12, 2016

Right, I can actually reproduce this, so sg is messed up here.

@kforner
Copy link
Author

kforner commented Jul 12, 2016

such a faster than light reply !

@gaborcsardi
Copy link
Collaborator

gaborcsardi commented Jul 12, 2016

Yeah, it is totally messed up. The screen is created at install time. I don't know what I was thinking. Past me is just plain stupid....

@kforner
Copy link
Author

kforner commented Jul 12, 2016

This is particularly difficult to test systematically...

@gaborcsardi
Copy link
Collaborator

gaborcsardi commented Jul 12, 2016

In general yes, but crayon already has the machinery to test this, actually. Anyway, only the color tables are broken, the rest should be ok. I'll fix them soon.

@kforner
Copy link
Author

kforner commented Jul 12, 2016

ok. By the way, do you have an equivalent of the xtermStyle::discrete.color() function ?

@gaborcsardi
Copy link
Collaborator

gaborcsardi commented Jul 12, 2016

Not directly. But make_style can take RGB colors, so you can use any tool in R to create a list of colors and then pass it to make_style.

@kforner
Copy link
Author

kforner commented Jul 12, 2016

ok, thanks.

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