| 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 |
Extract a bird's color palette
bird_colors( palette_name = "Scarlet Macaw", ncols = NA, reverse = FALSE, expand_palette = FALSE )bird_colors( palette_name = "Scarlet Macaw", ncols = NA, reverse = FALSE, expand_palette = FALSE )
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? |
Extracted bird colors.
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)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 pictures of available bird color palettes
bird_palette_visualizer(all_or_rec = "all", pdf_plot = FALSE, path)bird_palette_visualizer(all_or_rec = "all", pdf_plot = FALSE, path)
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. |
Creates pdf of all available birds or rec birds
bird_palette_visualizer("all")bird_palette_visualizer("all")
Search for available bird color palettes
bird_search(sp_name = "Penguin")bird_search(sp_name = "Penguin")
sp_name |
Provide full or partial name of bird you are looking for |
Returns character string of available birds
bird_search("Hummingbird")bird_search("Hummingbird")
Return leaders in contributing bird color palettes
leaderboard()leaderboard()
Returns data.frame of leaderboard in contributing bird color palettes
leaderboard()leaderboard()
Create ggplot color gradient
scale_color_bird( bird_cols, midpoint = NA, name = ggplot2::waiver(), lim = NULL, na.value = "grey50", guide = "colourbar" )scale_color_bird( bird_cols, midpoint = NA, name = ggplot2::waiver(), lim = NULL, na.value = "grey50", guide = "colourbar" )
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 |
ggplot-friendly color gradient
scale_color_bird(bird_colors())scale_color_bird(bird_colors())
Create ggplot fill gradient
scale_fill_bird( bird_cols, midpoint = NA, name = ggplot2::waiver(), lim = NULL, na.value = "grey50", guide = "colourbar" )scale_fill_bird( bird_cols, midpoint = NA, name = ggplot2::waiver(), lim = NULL, na.value = "grey50", guide = "colourbar" )
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 |
ggplot-friendly fill gradient
scale_fill_bird(bird_colors())scale_fill_bird(bird_colors())