Skip to content

Could scales col_* manipulation functions support relative operations? #506

@davidhodge931

Description

@davidhodge931

The scales col_* manipulation functions are super useful as they can operate on a scales::pal_* function.

It'd be great if they could support relative operations like the {colorspace} ones do.

library(scales)
pal_vctr <- pal_hue(h.start = 0)(3)
pal_vctr
#> [1] "#F8766D" "#00BA38" "#619CFF"
show_col(pal_vctr)

show_col(col_lighter(pal_vctr, amount = 25))

show_col(colorspace::lighten(pal_vctr, method = "relative", amount = 0.33))

Created on 2025-07-17 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions