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

Normal color vision option in dichromat (identity function) #3

Closed
brianwdavis opened this issue Jan 16, 2018 · 3 comments
Closed

Normal color vision option in dichromat (identity function) #3

brianwdavis opened this issue Jan 16, 2018 · 3 comments

Comments

@brianwdavis
Copy link

I was using purrr to simulate a palette with all the color deficiencies, which works fine. But it would be great if I could also include an option for "normal", which would return the palette unchanged for comparison.

library(magrittr)
library(purrr)

c("prot", "deut", "trit") %>% 
  map(~dichromat(blues9, type = .))

Having an option for "normal" inside that first vector would mean being able to generate a figure like this in just a couple lines:

image

I imagine this is an easier feature than vectorizing dichromat to accept a vector of arguments to type =.

@jonclayden
Copy link
Owner

Good thought, thanks. In fact, vectorising over type should be manageable and would be consistent with other package functions, so I'll look into it.

@jonclayden
Copy link
Owner

OK, with the current development version you should be able to do things like

blues9 %>% dichromat(c("n","p","d","t")) %>% swatch

If you could check that it works for you, I'll close the issue. Thanks again for the suggestion!

@brianwdavis
Copy link
Author

Looks great to me, 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