difference: Blend colours and palettes using difference mode

View source: R/difference.R

differenceR Documentation

Blend colours and palettes using difference mode

Description

Subtracts the darker colour from the lighter. Identical colours produce black; white inverts the other colour.

Usage

difference(...)

Arguments

...

Either one or two colour/palette arguments:

  • If one argument: the colour or palette is blended with itself

  • If two arguments: the first is blended with the second Each argument can be a character vector of colours or a ⁠scales::pal_*()⁠ function

Value

Character vector of blended colours or a blending function.

Examples

difference("#FFA600FF", "#8991A1FF")

blends documentation built on May 4, 2026, 9:09 a.m.