| Title: | Collection of Artistic and Nature-Inspired Color Palettes |
|---|---|
| Description: | Offers a variety of color palettes inspired by art, nature, and personal inspirations. Each palette is accompanied by a unique backstory, enriching the understanding and significance of the colors. |
| Authors: | Loukas Theodosiou [aut, cre] (ORCID: <https://orcid.org/0000-0001-6418-4652>), Kristian Ullrich [aut] (ORCID: <https://orcid.org/0000-0003-4308-9626>) |
| Maintainer: | Loukas Theodosiou <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.0 |
| Built: | 2026-05-20 09:36:01 UTC |
| Source: | https://github.com/loukesio/ltc-color-palettes |
Darken or lighten an entire palette or specific colors within it. Uses the colorspace package for perceptually uniform adjustments.
adjust_ltc(palette_name, amount = 0, which = NULL)adjust_ltc(palette_name, amount = 0, which = NULL)
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. |
A vector of adjusted hex color codes with class "ltc"
# 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))# 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))
Visualizes a selected colour palette in the form of a bird drawing. Requires at least 5 colors in the palette.
bird(chrom)bird(chrom)
chrom |
An ltc palette object |
A ggplot2 object showing a bird drawing using the selected colours.
# Create a bird visualization pal <- ltc(paloma) bird(pal)# Create a bird visualization pal <- ltc(paloma) bird(pal)
Apply different lightness adjustments to each color in a palette.
custom_adjust_ltc(palette_name, adjustments)custom_adjust_ltc(palette_name, adjustments)
palette_name |
Character or unquoted name. Name of the ltc palette. |
adjustments |
Numeric vector. Lightness adjustments for each color (-100 to 100). Length must match the palette length. |
A vector of adjusted hex color codes with class "ltc"
# Different adjustment for each color custom_adjust_ltc(remains, c(-30, 0, 40, 0)) # Create gradient effect custom_adjust_ltc("maya", c(-40, -20, 0, 20, 40))# Different adjustment for each color custom_adjust_ltc(remains, c(-30, 0, 40, 0)) # Create gradient effect custom_adjust_ltc("maya", c(-40, -20, 0, 20, 40))
Reduce color saturation (make colors more gray).
desaturate_ltc(palette_name, amount = 0.5, which = NULL)desaturate_ltc(palette_name, amount = 0.5, which = NULL)
palette_name |
Character or unquoted name. Name of the ltc palette. |
amount |
Numeric. Desaturation amount (0 to 1). 0 = no change, 1 = completely gray. |
which |
Integer vector. Which colors to desaturate. If NULL (default), affects all colors. |
A vector of desaturated hex color codes with class "ltc"
# Desaturate entire palette desaturate_ltc(luminaries, amount = 0.5) # Desaturate only specific colors desaturate_ltc("heatmap2", amount = 0.7, which = c(1, 2))# Desaturate entire palette desaturate_ltc(luminaries, amount = 0.5) # Desaturate only specific colors desaturate_ltc("heatmap2", amount = 0.7, which = c(1, 2))
This dataframe contains the backstory or inspiration behind each color palette.
infoinfo
An object of class data.frame with 31 rows and 2 columns.
A list containing predefined colour palettes with artistic backstories.
This function provides the desired colour palette by name. You can call it with or without quotes: ltc(paloma) or ltc("paloma")
palettes ltc(name, n, type = c("discrete", "continuous"))palettes ltc(name, n, type = c("discrete", "continuous"))
name |
Character or unquoted name. The name of the desired palette. |
n |
Integer. The number of colors you want from the palette. If omitted, it uses all colors from the palette. |
type |
The type of palette. Either "discrete" or "continuous". |
An object of class list of length 31.
ltc: A Collection of Art-inspired Colour Palettes
This package provides a collection of color palettes inspired by art, nature, and personal preferences. Each palette has a backstory, providing context and meaning to the colors.
A vector of hex color codes with class "ltc"
# Load a palette (with or without quotes) ltc(paloma) ltc("maya") # Select first 3 colors ltc(maya, n = 3) # Generate continuous palette ltc(remains, n = 10, type = "continuous")# Load a palette (with or without quotes) ltc(paloma) ltc("maya") # Select first 3 colors ltc(maya, n = 3) # Generate continuous palette ltc(remains, n = 10, type = "continuous")
Visualizes a selected colour palette as a bar of colours.
## S3 method for class 'ltc' plot(x, ...)## S3 method for class 'ltc' plot(x, ...)
x |
An ltc palette object |
... |
Additional arguments (currently unused). |
A ggplot2 object showing the selected colours.
# Create and plot a palette pal <- ltc(paloma) plot(pal)# Create and plot a palette pal <- ltc(paloma) plot(pal)
Custom print method that displays the palette name followed by hex color codes with actual colors visible in the console.
## S3 method for class 'ltc' print(x, ...)## S3 method for class 'ltc' print(x, ...)
x |
An ltc palette object |
... |
Additional arguments (currently unused) |
Invisibly returns the palette object