| Title: | Blend Colours and Palettes |
|---|---|
| Description: | Colour blend functions. These functions make it easier to blend colours and palettes using digital blend modes such as multiply, screen, and overlay. |
| Authors: | David Hodge [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-3868-7501>) |
| Maintainer: | David Hodge <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-06-03 10:38:18 UTC |
| Source: | https://github.com/davidhodge931/blends |
Darkens the destination colour to reflect the source by increasing contrast. Produces deep, saturated results.
colour_burn(...)colour_burn(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
colour_burn("#FFA600FF", "#8991A1FF")colour_burn("#FFA600FF", "#8991A1FF")
Brightens the destination colour to reflect the source by decreasing contrast. Produces bright, washed-out results.
colour_dodge(...)colour_dodge(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
colour_dodge("#FFA600FF", "#8991A1FF")colour_dodge("#FFA600FF", "#8991A1FF")
Darkens colours by selecting the darker of two colour values for each RGB channel. Useful for creating shadows or combining dark elements.
darken(...)darken(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
darken("#FFA600FF", "#8991A1FF")darken("#FFA600FF", "#8991A1FF")
Subtracts the darker colour from the lighter. Identical colours produce black; white inverts the other colour.
difference(...)difference(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
difference("#FFA600FF", "#8991A1FF")difference("#FFA600FF", "#8991A1FF")
Similar to difference but with lower contrast. Identical colours produce grey rather than black.
exclusion(...)exclusion(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
exclusion("#FFA600FF", "#8991A1FF")exclusion("#FFA600FF", "#8991A1FF")
Combines multiply and screen depending on the lightness of the first colour. Like overlay but the first colour controls whether darkening or lightening is applied.
hard_light(...)hard_light(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
hard_light("#FFA600FF", "#8991A1FF")hard_light("#FFA600FF", "#8991A1FF")
Lightens colours by selecting the lighter of two colour values for each RGB channel. Useful for creating highlights or combining light elements.
lighten(...)lighten(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
lighten("#FFA600FF", "#8991A1FF")lighten("#FFA600FF", "#8991A1FF")
Darkens colours by multiplying them together. Creates darker, more saturated results. Useful for creating shadows, darkening backgrounds, or adding depth.
multiply(...)multiply(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
multiply("#F0F0F0", "#808080") multiply("#FF6B6B")multiply("#F0F0F0", "#808080") multiply("#FF6B6B")
Combines multiply and screen depending on the lightness of the second colour. Values below 50% grey are multiplied (darkened); values above are screened (lightened).
overlay(...)overlay(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
overlay("#FFA600FF", "#8991A1FF")overlay("#FFA600FF", "#8991A1FF")
Lightens colours by inverting, multiplying, then inverting again. Creates brighter results. Useful for creating highlights, lightening backgrounds, or adding luminosity.
screen(...)screen(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
screen("#2C2C2C", "#808080") screen("#4A4A4A")screen("#2C2C2C", "#808080") screen("#4A4A4A")
A softer version of hard light. Darkens or lightens depending on the first colour, but with a gentler effect than hard light.
soft_light(...)soft_light(...)
... |
Either one or two colour/palette arguments:
|
Character vector of blended colours or a blending function.
soft_light("#FFA600FF", "#8991A1FF")soft_light("#FFA600FF", "#8991A1FF")