GithubHelp home page GithubHelp logo

colorblindr's People

Contributors

bbolker avatar clairemcwhite avatar clauswilke avatar eliocamp avatar wckdouglas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

colorblindr's Issues

Trouble installing colorblindr

Hi Claus,

I'm trying to install the colorblindr package with the following command on my windows computer with R version 3.4.2: devtools::install_github("clauswilke/colorblindr")

It looks like the installation is failing because it's not working correctly with colorspace. The error I get is:

preparing package for lazy loading
Error : object 'deutan' is not exported by 'namespace:colorspace'
ERROR: lazy loading failed for package 'colorblindr'
removing 'C:/Users/ClaraShaw/Documents/R/win-library/3.4/colorblindr'
Installation failed: Command failed (1)

I installed cowplot and colorspace today, so I'm not sure what's wrong, and I couldn't find much on troubleshooting this issue.

Thanks so much for your help!
-Clara

Use `last_plot()` as default `plot`

Hi! Great 📦 !

I think setting last_plot() as the default value for plot in view_cvd(), cvd_grid() and edit_colors() could make life easier for interactive use.

Error in installing - cannot find desaturate from colorspace

Hi. I previously had colorblindr working on my R studio setup, but not longer. So I reinstalled. This is what I'm getting.

I downloaded a fresh cowplot and colorspace.
I have R 3.5 on Mac OS and R Studio Version 1.1.463
on MacOS 13.3

─  preparing ‘colorblindr’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘colorblindr_0.1.0.tar.gz’
   
* installing *source* package ‘colorblindr’ ...
** R
** inst
** byte-compile and prepare package for lazy loading
Error : object ‘desaturate’ is not exported by 'namespace:colorspace'
ERROR: lazy loading failed for package ‘colorblindr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/colorblindr’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/var/folders/gx/mfdx8g856wvdtp0dw7k8h2s80000gn/T//Rtmps2mG9T/filec65216f0c535/colorblindr_0.1.0.tar.gz’ had non-zero exit status

cvd_grid() error

Hi Claus,
When I try running cvd_grid(), I get the following error: "Error in desaturate(c, severity) : unused argument (severity)"

In the attached screenshot, I did the following:

  1. I uninstalled colorspace.
  2. I reinstalled colorspace using the code provided in the README (https://github.com/clauswilke/colorblindr/blob/master/README.md).
  3. I also ran the installation code for cowplot and colorblindr to show that both are installed and up to date.
  4. I then proceeded with the example in the README, which works until I try the cvd_grid function.

Since I was running R v. 3.3.1, I decided to update R to the latest version. I then reinstalled the tidyverse and devtools packages, and then ran the code in the README. However, I still get the same error.

Let me know what further information I can provide to solve this issue. (Still very new at this!)

Thanks,
Irene

colorblindr

geom_label() sneaks past cvd_grid()

Hello,

I just wanted to give a short heads up about a minor issue I stumbled upon:

when playing around with this great package I just realized some unexpected behaviour with when using geom_label() in combination cvd_grid() - somehow the color of this particular geom stays untouched:

library(tidyverse)
library(colorblindr)
#> Loading required package: colorspace

p <- tibble(label = 'test') %>%
  ggplot()+
  geom_segment(aes(x = -1, xend = 1,y = 0, yend = 0, color = label))+
  geom_label(aes(x=0,y=0,label = label, color = label))+
  theme_void()

cvd_grid(p)

Created on 2019-08-27 by the reprex package (v0.3.0)

cheers,
Kosmas

Feature request: a function that scores a specific color wrt "colorblindness perceivability"

Could the package include a function that calculates some kind of a "colorblindness accessibility score" given a color (or palette)?

The code here http://mkweb.bcgsc.ca/colorblind/code.mhtml#page-container appears to be able to calculate correction (see getcorrection fcn) to provide "variants".

Given such a score, a color that is similar (in hue?) but better wrt colorblindness perception could be found and used to improve a specific set of colors?

Personally I'd like to use such functionality to improve the accessibility for colorblind perception of this specific color palette: https://github.com/KTH-Library/ktheme/blob/master/R/palette.R#L42-L81

Failed to install 'colorblindr' from GitHub

I successfully installed "cowplot" and "colorspace" as instructed, but failed to install 'colorblindr'. Very disappointed since I have bought the wonderful book "Fundamentals of Data Visualization" but am unable to produce same graphs. Error message is as below. Your help is needed. Thank you.

remotes::install_github("clauswilke/colorblindr")
Downloading GitHub repo clauswilke/colorblindr@master
Installing 7 packages: shiny, promises, later, httpuv, xtable, sourcetools, fastmap
Installing packages into ‘C:/Users/magpie/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Error: Failed to install 'colorblindr' from GitHub:
(converted from warning) unable to access index for repository https://owi.usgs.gov/R/bin/windows/contrib/4.0:
cannot open URL 'https://owi.usgs.gov/R/bin/windows/contrib/4.0/PACKAGES'

R version 4.0.0
RStudio version 1.2.5001
colorspace version 1.4-1
cowplot version 1.0.0

availability for 'Beagle Scouts' (4.3.1)

> install.packages("colorblindr")
Warning in install.packages :
  package ‘colorblindr’ is not available for this version of R

Love this package! I just had to upgrade to Beagle Scouts and it looks like it isn't yet available for this release. (You probably already knew, but I figured that I should create a GH issue, just in case!)

possible to create separate functions for each type of colorblindness?

Hello!

Do you think it would be possible to create individual functions for each of the colorblind types? I think that it is very useful to display them in a single grid, but it would also be nice to have some flexibility in how we present them.

Happy to help with a PR for this, and also with any help you might like in submitting this to CRAN - this is a super useful package!

add vignette on adding images to plots?

Let's say you have an image of three species of flower with an outline of each filled using the OkabeIto color scale. This way, when you view the colorblinr images you also see how colorblindness affects the accompanying visuals that use the same color scheme? Do you have a vignette for how to adding images to these plots before you export them to colorblindr?

Release colorblindr on CRAN

We should prepare a proper release. What is still needed? Here are some things I can think about:

  • Move github repo to wilkelab. This allows us to add a pkgdown website and host it under wilkelab.org, as in https://wilkelab.org/isoband/ or https://wilkelab.org/ungeviz/.
  • Check dependencies. Do we depend on the development version of cowplot, as the readme states? The listed dependency is >0.8.0, and the version on CRAN is 0.9.4, so this should be fine.
  • No packages other than base R should be listed under "Depends". All other dependencies should be listed under "Imports".
  • Update installation instructions in the readme.
  • Review all vignettes.
  • Remove the ggplot2 color scales vignette. It is outdated and there are other packages now that focus specifically on color scales, e.g. paletteer.

Something else?

install via remotes::install_github("clauswilke/colorblindr") throws error

ERROR: lazy loading failed for package 'colorblindr'
* removing 'C:/Users/.../R/win-library/3.6/colorblindr'
Error: Failed to install 'colorblindr' from GitHub:
  (converted from warning) installation of package ‘C:/Users/.../colorblindr_0.1.0.tar.gz’ had non-zero exit status

Install via downloading zip and running devtools::install("") seems to have worked.

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.