Title: | Colour Palettes Inspired by Butterflies |
Version: | 0.1.0 |
Description: | A collection of colour palettes inspired by some of our dearest butterfly species. This package provides continuous and categorical palettes, including some colour blind friendly options. |
License: | GPL (≥ 3) |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2025-05-15 10:12:50 UTC; saragamboa |
Author: | Sara Gamboa |
Maintainer: | Sara Gamboa <sara.gamboa@uvigo.gal> |
Repository: | CRAN |
Date/Publication: | 2025-05-19 13:30:02 UTC |
Colour palettes inspired by butterflies
Description
Returns a colour palette from the lepidochroma
collection.
Usage
lepidochroma(name, n = NULL)
Arguments
name |
Palette name (see the |
n |
Number of colours to return. It is an optional argument:
if it is not specified, all available colours for the specified
palette will be returned. For continuous palettes (see the
output of |
Value
A character vector with colours as hexadecimal strings.
Examples
# Discrete palette
lepidochroma("attacus", 4)
# Continuous palette
lepidochroma("morpho", 30)
Palette preview
Description
Displays a preview of a palette or a set of palettes with the specified number of colours in a plot.
Usage
lepidochroma_display(
name = NULL,
n = NULL,
type = c("all", "discrete", "continuous"),
colourblind_only = FALSE
)
Arguments
name |
Palette name (see the |
n |
Number of colours to display. It is an optional argument, if it is not specified, the plot will display all the available colours. |
type |
The type of palettes to be displayed ( |
colourblind_only |
A logical value. If |
Value
No return value, called for side effects.
Examples
# Discrete palette
lepidochroma_display("parthenos", 3)
# Continuous palette
lepidochroma_display("battus", 30)
Get information on available palettes
Description
Returns a data frame with the names and information on the palettes that are available in the package.
Usage
lepidochroma_palettes()
Value
A data frame with 3 variables:
name: palette name
n_colours: number of colours in the palette
type: continuous or discrete
colourblind_friendly: a logical value indicating if the palette is colour blind friendly
Examples
lepidochroma_palettes()