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

Palette manipulation functions #466

Merged
merged 7 commits into from
Oct 22, 2024
Merged

Conversation

teunbrand
Copy link
Contributor

@teunbrand teunbrand commented Oct 10, 2024

This PR aims to fix #236.

Briefly, it enables the colour manipulation function introduced in #424 to work on palettes introduced in #427.
It also adds a plot() method to palettes to make them easier to visualise.

devtools::load_all("~/packages/scales/")
#> ℹ Loading scales

pal_viridis() |>
  col_mix(b = "red") |>
  col_lighter(amount = 30) |>
  plot()

Created on 2024-10-10 with reprex v2.1.1

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

R/colour-manip.R Outdated Show resolved Hide resolved
Merge branch 'main' into palette_manipulation

# Conflicts:
#	R/pal-.R
@thomasp85 thomasp85 merged commit fda519e into r-lib:main Oct 22, 2024
12 checks passed
@teunbrand teunbrand deleted the palette_manipulation branch October 22, 2024 08:40
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 this pull request may close these issues.

Add effects to gradient_n_pal()
2 participants