saturation: Control palette saturation

saturationR Documentation

Control palette saturation

Description

Generic function to control the saturation of a palette.

Usage

saturate(x, amount = 0.1, ...)

## Default S3 method:
saturate(x, amount = 0.1, ...)

## S3 method for class 'palette'
saturate(x, amount = 0.1, ...)

desaturate(x, amount = 0.1, ...)

## Default S3 method:
desaturate(x, amount = 0.1, ...)

## S3 method for class 'palette'
desaturate(x, amount = 0.1, ...)

Arguments

x

A vector of colors

amount

A numeric value to control the saturation of the palette

...

Additional arguments passed to other methods. Currently ignored.

Value

A palette vector with the saturation adjusted

Examples

saturate(palette(roygbiv))
desaturate(palette(roygbiv))

palette documentation built on Sept. 13, 2025, 9:08 a.m.