GithubHelp home page GithubHelp logo

Comments (9)

gaborcsardi avatar gaborcsardi commented on June 1, 2024

This does not seem to be a crayon error to me, the terminal simply does not interpret the colors. E.g. try

cat("\033[34mfoobar\033[39m")

Does this come out as blue?

from crayon.

alaindanet avatar alaindanet commented on June 1, 2024

Thank you very for your help!
However, it did not come out in color either in gnome-terminal and xterm.

> library(crayon)                                                                                             
> cat("\033[34mfoobar\033[39m")                                                                               
34mfoobar39m>

from crayon.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

Yeah, that's the thing, the problem is not with crayon, it is seemingly with your terminal or terminal settings.

from crayon.

alaindanet avatar alaindanet commented on June 1, 2024

Okay, I go to look on this side.
Thanks again!

from crayon.

alaindanet avatar alaindanet commented on June 1, 2024

Well, here is the summary of the various test that I ran.

  • My terminal supports colors:

color_support

  • In R, colorout which provides
    colored output in R console, is working well:
library(crayon)
cat(blue("test"))

library(colorout)
rnorm(5)
noColorOut()
rnorm(5)  

The previous command lines gives:

colored_output

BUT, the two packages are actually incompatibles:

library(colorout) # ColorOut activated
library(crayon, help)
cat(blue("Hello", "world!\n"))
noColorOut() # Colorout inactivated
cat(blue("Hello", "world!\n"))

gives:
colored_output2

When colorout is activated, crayon is not working!

Thank you so much for your help!

from crayon.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

It is a bug in colorout then. It assumes that the output is not colored.

from crayon.

alaindanet avatar alaindanet commented on June 1, 2024

Yes, I will notify the maintainer of the package.

from crayon.

alaindanet avatar alaindanet commented on June 1, 2024

The problem was fixed after updating colorout to the version 1.2.0.

jalvesaq/colorout#17

from crayon.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

Cool.

from crayon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.