| Title: | A Collection of Palettes and Some Functions to Help Use Them | 
| Version: | 0.1.0 | 
| Imports: | ggplot2 | 
| Description: | A collection of color palettes that were extracted from various books on my sons(Wren) bookshelf. Also included are a number of functions and wrappers to utilize them, as well as to subset the palettes to desired number/specific colors. | 
| License: | MIT + file LICENSE | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.1.2 | 
| URL: | https://github.com/buveges/WrensBookshelf | 
| BugReports: | https://github.com/buveges/WrensBookshelf/issues | 
| NeedsCompilation: | no | 
| Packaged: | 2022-08-12 18:23:02 UTC; benjaminuveges | 
| Author: | Benjamin Uveges | 
| Maintainer: | Benjamin Uveges <uvegesbti@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2022-08-15 09:10:04 UTC | 
View a book palette
Description
Generates a graphic object using a specified palette from WrensBookshelf.
Usage
ShowBook(name)
Arguments
| name | Name of desired palette. | 
Value
Graphic object.
Examples
ShowBook(name ="BabyWrenAndTheGreatGift")
View all of Wren's Books
Description
Generates a graphic object with desired subset of palettes from WrensBookshelf.
Usage
ShowBookshelf(CVDsafe = FALSE, BestFor = NA)
Arguments
| CVDsafe | Argument used to restrict displayed palettes to those that are color vision deficiency (CVD) safe. Default is FALSE, set to TRUE to enact filter. | 
| BestFor | Argument used to restrict displayed palettes to those that are best for either continuous or discrete data types. Arguments are "discrete" or "continuous" | 
Value
Graphic object.
Examples
ShowBookshelf()
ShowBookshelf(CVDsafe = TRUE, BestFor = "continuous")
Customize WrensBookshelf palettes
Description
Function used to create continuous/discrete palettes using the palettes in WrensBookshelf.
Usage
WB_brewer(
  name,
  n,
  type = c("discrete", "continuous"),
  direction = c(1, -1),
  override.order = FALSE
)
Arguments
| name | Name of palette from WrensBookshelf | 
| n | Number of colors to select, or size of continuous palette if n > length(palette) | 
| type | Type of palette you wish to generate ("continuous" or "discrete") | 
| direction | Direction you want the palette to proceed; 1 = direction shown in ShowBookshelf() or ShowBook(), -1 = reversed. | 
| override.order | Argument used to override the prescribed order that colors are selected from palettes for discrete palettes where n < length(palette). Default = FALSE. | 
Value
A color palette.
Examples
WB_brewer(name = "BabyWrenAndTheGreatGift", type = "continuous", n = 200)
WB_brewer(name = "JulienIsAMermaid", type = "discrete",
          direction = -1, n = 7, override.order = TRUE)
Customize WrensBookshelf palettes
Description
Function used to create customized continuous/discrete palettes using the palettes in WrensBookshelf, offering more specific control over selected colors than WB_brewer.
Usage
WB_subset_brewer(
  name,
  n = NA,
  LCR,
  type = c("continuous", "discrete"),
  direction = c(1, -1),
  n2 = NULL
)
Arguments
| name | Name of palette from WrensBookshelf. | 
| n | Number of colors to select/subset. | 
| LCR | Location from which you want select n colors from in specified palette ("left","right", "center"). Can also use a vector of specific color numbers within palette (e.g. c(1,4,7)) | 
| type | Type of palette you wish to generate ("continuous" or "discrete") | 
| direction | Direction you want the palette to proceed; 1 = direction shown in ShowBookshelf() or ShowBook(), -1 = reversed. | 
| n2 | If type = "continuous", length of palette to generate. | 
Value
Color palette.
Examples
WB_subset_brewer(name = "JulienIsAMermaid", n = 5,
                 LCR = "left", type = "continuous", n2 = 200)
WB_subset_brewer(name = "WhereTheWildThingsAre", type = "discrete", LCR = c(1,4,5,6))
Complete list of palettes.
Description
Use names(WrensBookshelf) to display all possible palette names. Current available palettes:
BabyBeluga, BabyWrenAndTheGreatGift, BlueberriesForSal, BoTheBrave,
BoTheBraveCVDS, BurtDow, BurtDowCVDS, CapsForSale, GustavoTheShyGhostCover,
GustavoTheShyGhostGraveyard, HaroldAndThePurpleCrayon, JeffGoesWild,
JulienIsAMermaid, LittleBlueHouseBesideTheSeaCont, LittleBlueHouseBesideTheSeaDisc,
Madelline, MakeWayForDucklings, MoreThanALittle, OhThePlacesYoullGo,
Opposites, StackTheCats, TheDucklingGetsACookie, TheHoneybee,
TheHoneybeeDiverging, ThePoutPoutFish, TheSnowyDay, TheStoryOfBabar,
TheseWordsIShapedForYou, ThisMooseBelongsToMe, ThreeLittleVikings, TigerDays,
TinyPerfectThings, Vampenguin, WhatWellBuild, WhereTheWildThingsAre, and YouMatter.
Usage
WrensBookshelf
Format
An object of class list of length 40.
Value
No return value, sets a list of palettes to be used with WrensBookshelf functions
Use WrensBookshelf with ggplot
Description
Wrapper function to allow easy integration with ggplot2. Sets continuous color scale.
Usage
scale_color_WB_c(name, direction = 1, ...)
Arguments
| name | Name of palette from WrensBookshelf. | 
| direction | Direction you want the palette to proceed; 1 = direction shown in ShowBookshelf() or ShowBook(), -1 = reversed. | 
| ... | See scale_color_gradientn() for additional params. | 
Value
No return value, integrates WB_brewer into ggplot2 function.
Examples
ggplot2::ggplot(mtcars, ggplot2::aes(x=disp,y=wt, color = mpg))+
ggplot2::geom_point(size=3)+
scale_color_WB_c(name = "WhatWellBuild")
Use WrensBookshelf with ggplot
Description
Wrapper function to allow easy integration with ggplot2. Sets discrete color scale
Usage
scale_color_WB_d(name, direction = 1, override.order = FALSE, ...)
Arguments
| name | Name of palette from WrensBookshelf. | 
| direction | Direction you want the palette to proceed; 1 = direction shown in ShowBookshelf() or ShowBook(), -1 = reversed. | 
| override.order | Argument used to override the prescribed order that colors are selected from palettes for discrete palettes where n < length(palette). Default = FALSE. | 
| ... | See discrete_scale() for additional params. | 
Value
No return value, integrates WB_brewer into ggplot2 function.
Examples
ggplot2::ggplot(mtcars, ggplot2::aes(x = disp,y = wt, color = factor(cyl)))+
ggplot2::geom_point(size=3)+
scale_color_WB_d(name = "YouMatter")
Use WrensBookshelf with ggplot
Description
Wrapper function to allow easy integration with ggplot2. Sets continuous fill scale.
Usage
scale_fill_WB_c(name, direction = 1, ...)
Arguments
| name | Name of palette from WrensBookshelf. | 
| direction | Direction you want the palette to proceed; 1 = direction shown in ShowBookshelf() or ShowBook(), -1 = reversed. | 
| ... | See scale_color_gradientn() for additional params. | 
Value
No return value, integrates WB_brewer into ggplot2 function.
Examples
ggplot2::ggplot(mtcars, ggplot2::aes(x = disp,y = wt, fill= mpg))+
ggplot2::geom_point(size=3, shape = 21)+
scale_fill_WB_c(name = "WhatWellBuild")
Use WrensBookshelf with ggplot
Description
Wrapper function to allow easy integration with ggplot2. Sets discrete color scale.
Usage
scale_fill_WB_d(name, direction = 1, override.order = FALSE, ...)
Arguments
| name | Name of palette from WrensBookshelf. | 
| direction | Direction you want the palette to proceed; 1 = direction shown in ShowBookshelf() or ShowBook(), -1 = reversed. | 
| override.order | Argument used to override the prescribed order that colors are selected from palettes for discrete palettes where n < length(palette). Default = FALSE. | 
| ... | See discrete_scale() for additional params. | 
Value
No return value, integrates WB_brewer into ggplot2 function.
Examples
ggplot2::ggplot(mtcars, ggplot2::aes(x = disp,y = wt, fill = factor(cyl)))+
ggplot2::geom_point(size = 3, shape = 21)+
scale_fill_WB_d(name = "YouMatter")