Package 'birdcolors'

Title: Create Palettes from the Colors of the World's Birds
Description: Create attractive palettes based on the colors of the world's birds. Palettes are composed of 2 to 9 colors, with options to expand palettes via interpolation. Compatible with the package 'ggplot2' and base R graphics.
Authors: Ben Tonelli [aut, cre], Casey Youngflesh [aut], Chris Sayers [ctb], Ellie Magaldi [ctb]
Maintainer: Ben Tonelli <[email protected]>
License: MIT + file LICENSE
Version: 1.0.1
Built: 2026-06-02 09:29:28 UTC
Source: https://github.com/cran/birdcolors

Help Index


Extract a bird's color palette

Description

Extract a bird's color palette

Usage

bird_colors(
  palette_name = "Scarlet Macaw",
  ncols = NA,
  reverse = FALSE,
  expand_palette = FALSE
)

Arguments

palette_name

Common name of a bird

ncols

Number of colors to extract

reverse

Should the palette order be flipped?

expand_palette

Should the palette be expanded to more colors?

Value

Extracted bird colors.

Examples

bird_colors()
bird_colors("Scarlet Macaw")
bird_colors("Scarlet_Macaw",7)
bird_colors("Scarlet_Macaw",4,reverse=TRUE)
bird_colors("Bluethroat",4,reverse=TRUE,expand_palette=15)

Return available bird color palettes

Description

Return available bird color palettes

Usage

bird_menu(all_or_rec = "all")

Arguments

all_or_rec

Option "all" returns all available palettes, "rec" returns recommended

Value

Returns data.frame of available birds and color number

Examples

bird_menu()

Return pictures of available bird color palettes

Description

Return pictures of available bird color palettes

Usage

bird_palette_visualizer(all_or_rec = "all", pdf_plot = FALSE, path)

Arguments

all_or_rec

Option "all" returns all available palettes, "rec" returns recommended

pdf_plot

Create a pdf of available palettes. Default is to send directly to plots

path

Directory in which to save pdf if pdf_plot=TRUE. Must be specified by the user.

Value

Creates pdf of all available birds or rec birds

Examples

bird_palette_visualizer("all")

Return leaders in contributing bird color palettes

Description

Return leaders in contributing bird color palettes

Usage

leaderboard()

Value

Returns data.frame of leaderboard in contributing bird color palettes

Examples

leaderboard()

Create ggplot color gradient

Description

Create ggplot color gradient

Usage

scale_color_bird(
  bird_cols,
  midpoint = NA,
  name = ggplot2::waiver(),
  lim = NULL,
  na.value = "grey50",
  guide = "colourbar"
)

Arguments

bird_cols

Bird colors extracted via bird_colors function

midpoint

Midpoint of diverging color palette, only for 3-color palettes

name

Legend label

lim

Limits for color ramp

na.value

Color when value is outside range

guide

Legend type, see ggplot2::scale_fill_gradient for details

Value

ggplot-friendly color gradient

Examples

scale_color_bird(bird_colors())

Create ggplot fill gradient

Description

Create ggplot fill gradient

Usage

scale_fill_bird(
  bird_cols,
  midpoint = NA,
  name = ggplot2::waiver(),
  lim = NULL,
  na.value = "grey50",
  guide = "colourbar"
)

Arguments

bird_cols

Bird colors extracted via bird_colors function

midpoint

Midpoint of diverging color palette, only for 3-color palettes

name

Legend label

lim

Limits for color ramp

na.value

Color when value is outside range

guide

Legend type, see ggplot2::scale_fill_gradient for details

Value

ggplot-friendly fill gradient

Examples

scale_fill_bird(bird_colors())