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

Variable contrasting_color isn't created for specific background colors #523

Open
hy6-2 opened this issue Oct 30, 2024 · 0 comments
Open

Comments

@hy6-2
Copy link

hy6-2 commented Oct 30, 2024

I was trying to render a graph (render_graph()) and encountered an error that says:

Error in `dplyr::mutate()`:
ℹ In argument: `value_x = contrasting_text_color(background_color = value)`.
Caused by error in `contrasting_text_color()`:
! Object 'contrasting_color' doesn't exist.

And as I looked into the function contrasting_text_color(background_color) in utils.R (line 451-475), I found the variable contrasting_color wouldn't be created in the case when saturation < 0.35 & luminance <= 0.5, according to the conditions described in line 466-472. For my case, I was using "gray40" as the background_color, which matched the exception and caused the error.
Could you please revise the code? Thank you very much for your supports in advance!

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

1 participant