adjust_ltc: Adjust Lightness of Palette Colors

View source: R/adjust_palette.R

adjust_ltcR Documentation

Adjust Lightness of Palette Colors

Description

Darken or lighten an entire palette or specific colors within it. Uses the colorspace package for perceptually uniform adjustments.

Usage

adjust_ltc(palette_name, amount = 0, which = NULL)

Arguments

palette_name

Character or unquoted name. Name of the ltc palette to adjust.

amount

Numeric. Amount to adjust lightness (-100 to 100). Negative values darken, positive values lighten. Default is 0 (no change).

which

Integer vector. Which colors to adjust (e.g., c(1, 3) for 1st and 3rd). If NULL (default), adjusts all colors.

Value

A vector of adjusted hex color codes with class "ltc"

Examples


# Darken entire palette
adjust_ltc(alger, amount = -20)

# Lighten entire palette
adjust_ltc("maya", amount = 30)

# Darken only specific colors
adjust_ltc(remains, amount = -25, which = c(2, 4))


ltc documentation built on Jan. 16, 2026, 5:15 p.m.

Related to adjust_ltc in ltc...