Comments (3)
What's your OS? What's your RStudio version? What's crayon's version?
What's the output of
crayon:::detect_tty_colors()
What's the output of
system("tput colors 2>/dev/null", intern = TRUE)
from crayon.
Sorry, that was really bad GitHub etiquette on my part.
I'm running RStudio 1.4.1106 on Windows 10 build 19042. This is R 4.0.5 and crayon 1.4.1.
Both crayon:::detect_tty_colors()
and system("tput colors 2>/dev/null", intern = TRUE)
return 256 in RStudio's terminal.
I ran through num_ansi_colors()
with debugging and none of the if
statements were true. This meant it went to the last condition, running detect_tty_colors()
. In detect_tty_colors()
, the condition os_type() == "windows" && win10_build() >= 16257
was true, which returns a hardcoded 256L
.
Here's the session info:
Session info
# - Session info ---------------------------------------------------------------
# setting value
# version R version 4.0.5 (2021-03-31)
# os Windows 10 x64
# system x86_64, mingw32
# ui RTerm
# language (EN)
# collate English_United States.1252
# ctype English_United States.1252
# tz America/Los_Angeles
# date 2021-04-24
#
# - Packages -------------------------------------------------------------------
# package * version date lib source
# cli 2.4.0 2021-04-05 [1] standard (@2.4.0)
# crayon * 1.4.1 2021-02-08 [1] CRAN (R 4.0.5)
# glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.3)
# rlang 0.4.10 2020-12-30 [1] CRAN (R 4.0.5)
# sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.0)
# withr 2.4.1 2021-01-26 [1] standard (@2.4.1)
#
# [1] C:/Users/Alex/Documents/R/win-library/4.0
# [2] C:/Program Files/R/R-4.0.5/library
from crayon.
What's your shell in the terminal? CMD or PowerShell?
from crayon.
Related Issues (20)
- Detection of color-capable output broken inside an RStudio Job run as a script HOT 1
- win10_build: argument is of length 0 HOT 1
- Backport palette support from cli
- Move `master` branch to `main` HOT 1
- Ns in DNAstringset greys out all text in console that follows HOT 2
- Force all warnings to use crayon? HOT 3
- Release crayon 1.4.2
- red$bold(X) results in : Error in gsub: input string 1 is invalid UTF-8 HOT 3
- Color detection Github Actions HOT 5
- Does not install on R 3.4 and R 3.5, on Windows HOT 1
- Release crayon 1.5.0
- Potential NAMESPACE/import issue? HOT 1
- Release crayon 1.5.1
- Partial argument name: read.table(..., comment = ";")
- crayon doesn't mark encoding on UTF-8 strings in some cases HOT 3
- num_ansi_colors ignores stream parameter HOT 1
- strip_style() returns garbled output in non-UTF-8 locale when UTF-8 characters are present HOT 2
- Release crayon 1.5.2
- Upkeep for crayon (2023)
- crayon update from CRAN HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crayon.