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

Package import/suggest for munsell #296

Closed
elong0527 opened this issue Sep 30, 2020 · 3 comments · Fixed by #467
Closed

Package import/suggest for munsell #296

elong0527 opened this issue Sep 30, 2020 · 3 comments · Fixed by #467

Comments

@elong0527
Copy link

For riskmetric project, I am reviewing the dependency of scales package to understand the need to qualify scale package for regulatory purpose.

munsell is used to define default value for div_gradient_pal and seq_gradient_pal.

Is it possible to move munsell to suggest in DESCRIPTION file by using hex RGB representation for default value?

div_gradient_pal <- function(low = mnsl("10B 4/6"), mid = mnsl("N 8/0"), high = mnsl("10R 4/6"), space = "Lab") {

seq_gradient_pal <- function(low = mnsl("10B 4/6"), high = mnsl("10R 4/6"), space = "Lab") {

@clauswilke
Copy link
Collaborator

clauswilke commented Sep 30, 2020

Is a munsell dependency needed at all? Even in the examples, the package is used only to generate a few colors, and no explanation is given for why these specific colors. In my opinion, mnsl(complement("10R 4/6"), fix = TRUE) is not particularly less obscure than "#2E6A70".

My vote would be for replacing all calls to mnsl() with straight RGB values. We can make a note in the code explaining how the RGB colors were generated, in case somebody is wondering in the future.

@hadley
Copy link
Member

hadley commented Mar 16, 2022

I don't have any strong preference, except that removing mnsl will be some work and offers no real gain. So if someone else does a PR, I'll review it, but I don't think it's worth keeping this issue open.

@hadley hadley closed this as completed Mar 16, 2022
@teunbrand
Copy link
Contributor

I think this dependency isn't needed and removing it will help keep {scales} somewhat more lightweight.

I'd also throw the idea out there to remove the viridisLite and RColorBrewer dependencies, as many of their palettes are already available in grDevices::hcl.colors() (see hcl.pals() for example). However, we actually generate palettes with these packages, so they aren't as painless to remove.

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

Successfully merging a pull request may close this issue.

4 participants