├── .github
├── .gitignore
├── workflows
│ ├── pkgdown.yaml
│ ├── test-coverage.yaml
│ └── R-CMD-check.yaml
└── CONTRIBUTING.md
├── vignettes
├── .gitignore
├── tvthemes-1_0_0.Rmd
└── fonts-and-colors.Rmd
├── docs
├── logo.png
├── favicon.ico
├── favicon-16x16.png
├── favicon-32x32.png
├── apple-touch-icon.png
├── reference
│ ├── Rplot001.png
│ ├── Rplot002.png
│ ├── Rplot003.png
│ ├── Rplot004.png
│ ├── Rplot005.png
│ ├── Rplot006.png
│ ├── avatar_pal-1.png
│ ├── avatar_pal-2.png
│ ├── avatar_pal-3.png
│ ├── avatar_pal-4.png
│ ├── figures
│ │ ├── logo.png
│ │ ├── hilda.png
│ │ ├── b99_plot.png
│ │ ├── bighero6.png
│ │ ├── stannis.png
│ │ ├── bobspog.bg.png
│ │ ├── crystalgems.png
│ │ ├── kimpossible.png
│ │ ├── sponge_plot.png
│ │ ├── starks_plot.png
│ │ ├── tully_plot.png
│ │ ├── tyrell_plot.png
│ │ ├── airnomads_plot.png
│ │ ├── attackontitan.png
│ │ ├── b99regpal_plot.png
│ │ ├── gravityfalls.png
│ │ ├── greyjoy_plot.png
│ │ ├── lastairbender.png
│ │ ├── rickmorty_plot.png
│ │ ├── simpsons_plot.png
│ │ ├── stevenuniverse.png
│ │ ├── firenation_plot.png
│ │ ├── lannisters_plot.png
│ │ ├── parksandrec_both.png
│ │ ├── parksandrec_plot.png
│ │ ├── targaryens_plot.png
│ │ ├── watertribe_plot.png
│ │ ├── README-b99header-1.png
│ │ ├── earthkingdom_plot.png
│ │ ├── starktullytargaryen.png
│ │ ├── tvthemes-plots-img.png
│ │ ├── unnamed-chunk-2-1.png
│ │ ├── arrynmanderlymartell.png
│ │ ├── parksandreclight_plot.png
│ │ └── tyrelllannistergreyjoy.png
│ ├── hilda_pal-1.png
│ ├── hilda_pal-2.png
│ ├── hilda_pal-3.png
│ ├── hilda_pal-4.png
│ ├── hilda_pal-5.png
│ ├── bigHero6_pal-1.png
│ ├── bigHero6_pal-2.png
│ ├── bigHero6_pal-3.png
│ ├── bigHero6_pal-4.png
│ ├── simpsons_pal-1.png
│ ├── simpsons_pal-2.png
│ ├── simpsons_pal-3.png
│ ├── simpsons_pal-4.png
│ ├── theme_avatar-1.png
│ ├── westeros_pal-1.png
│ ├── westeros_pal-2.png
│ ├── westeros_pal-3.png
│ ├── westeros_pal-4.png
│ ├── westeros_pal-5.png
│ ├── westeros_pal-6.png
│ ├── brooklyn99_pal-1.png
│ ├── brooklyn99_pal-2.png
│ ├── brooklyn99_pal-3.png
│ ├── brooklyn99_pal-4.png
│ ├── brooklyn99_pal-5.png
│ ├── brooklyn99_pal-6.png
│ ├── kimPossible_pal-1.png
│ ├── kimPossible_pal-2.png
│ ├── kimPossible_pal-3.png
│ ├── kimPossible_pal-4.png
│ ├── parksAndRec_pal-1.png
│ ├── parksAndRec_pal-2.png
│ ├── parksAndRec_pal-3.png
│ ├── parksAndRec_pal-4.png
│ ├── spongeBob_pal-1.png
│ ├── spongeBob_pal-2.png
│ ├── spongeBob_pal-3.png
│ ├── spongeBob_pal-4.png
│ ├── theme_hildaDay-1.png
│ ├── theme_hildaDusk-1.png
│ ├── theme_simpsons-1.png
│ ├── theme_spongeBob-1.png
│ ├── attackOnTitan_pal-1.png
│ ├── attackOnTitan_pal-2.png
│ ├── attackOnTitan_pal-3.png
│ ├── attackOnTitan_pal-4.png
│ ├── gravityFalls_pal-1.png
│ ├── gravityFalls_pal-2.png
│ ├── gravityFalls_pal-3.png
│ ├── gravityFalls_pal-4.png
│ ├── rickAndMorty_pal-1.png
│ ├── rickAndMorty_pal-2.png
│ ├── rickAndMorty_pal-3.png
│ ├── rickAndMorty_pal-4.png
│ ├── theme_brooklyn99-1.png
│ ├── theme_hildaNight-1.png
│ ├── theme_parksAndRec-1.png
│ ├── stevenUniverse_pal-1.png
│ ├── stevenUniverse_pal-2.png
│ ├── stevenUniverse_pal-3.png
│ ├── stevenUniverse_pal-4.png
│ ├── stevenUniverse_pal-5.png
│ ├── stevenUniverse_pal-6.png
│ ├── theme_rickAndMorty-1.png
│ └── theme_parksAndRecLight-1.png
├── apple-touch-icon-60x60.png
├── apple-touch-icon-76x76.png
├── apple-touch-icon-120x120.png
├── articles
│ └── fonts-and-colors_files
│ │ └── figure-html
│ │ ├── unnamed-chunk-3-1.png
│ │ ├── unnamed-chunk-3-2.png
│ │ ├── unnamed-chunk-3-3.png
│ │ └── unnamed-chunk-3-4.png
├── pkgdown.yml
├── link.svg
├── extra.css
├── bootstrap-toc.css
├── docsearch.js
└── pkgdown.js
├── man
├── figures
│ ├── hilda.png
│ ├── logo.png
│ ├── stannis.png
│ ├── bighero6.png
│ ├── bobspog.bg.png
│ ├── crystalgems.png
│ ├── gravityfalls.png
│ ├── kimpossible.png
│ ├── sponge_plot.png
│ ├── airnomads_plot.png
│ ├── attackontitan.png
│ ├── b99regpal_plot.png
│ ├── firenation_plot.png
│ ├── lastairbender.png
│ ├── rickmorty_plot.png
│ ├── simpsons_plot.png
│ ├── stevenuniverse.png
│ ├── watertribe_plot.png
│ ├── earthkingdom_plot.png
│ ├── parksandrec_both.png
│ ├── README-b99header-1.png
│ ├── arrynmanderlymartell.png
│ ├── starktullytargaryen.png
│ └── tyrelllannistergreyjoy.png
├── sponge_images.Rd
├── import_avatar.Rd
├── import_spongeBob.Rd
├── import_theLastAirbender.Rd
├── import_simpsons.Rd
├── import_rickAndMorty.Rd
├── import_gravitationFalls.Rd
├── paintBikiniBottom.Rd
├── tvthemes.Rd
├── theme_theLastAirbender.Rd
├── theme_avatar.Rd
├── theme_parksAndRec_light.Rd
├── theme_parksAndRec.Rd
├── theme_rickAndMorty.Rd
├── theme_simpsons.Rd
├── theme_hildaDay.Rd
├── theme_hildaDusk.Rd
├── theme_hildaNight.Rd
├── theme_brooklyn99.Rd
├── theme_parksAndRecLight.Rd
├── theme_spongeBob.Rd
├── avatarTLA_pal.Rd
├── bigHero6_pal.Rd
└── simpsons_pal.Rd
├── .gitignore
├── pkgdown
├── favicon
│ ├── favicon.ico
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── apple-touch-icon.png
│ ├── apple-touch-icon-60x60.png
│ ├── apple-touch-icon-76x76.png
│ └── apple-touch-icon-120x120.png
└── extra.css
├── inst
├── backgrounds
│ ├── aot-titan.png
│ ├── sponge-floral.jpg
│ └── sponge-background.jpg
├── fonts
│ ├── Slayer
│ │ └── slayer11.TTF
│ ├── Simpsons-Font
│ │ └── akbar.ttf
│ ├── SpongeBob
│ │ ├── Some-Time-Later.ttf
│ │ └── LICENSE.txt
│ ├── Rick-And-Morty
│ │ └── get_schwifty.ttf
│ └── GravitationFalls
│ │ ├── gravitation_falls.otf
│ │ └── gravitation_falls.ttf
├── WORDLIST
└── test-generation-script.R
├── tests
├── testthat.R
└── testthat
│ ├── test-fonts.R
│ ├── test-bighero6.R
│ ├── test-attackontitan.R
│ ├── test-kimpossible.R
│ ├── test-gravityfalls.R
│ ├── test-spongebob.R
│ ├── test-rickandmorty.R
│ ├── test-simpsons.R
│ └── test-brooklyn99.R
├── .Rbuildignore
├── R
├── onattach.R
├── tvthemes-package.R
├── palette_simpsons.R
├── palette_bighero6.R
├── palette_kimpossible.R
├── palette_spongebob.R
├── palette_attackontitan.R
├── palette_rickandmorty.R
├── theme_rickandmorty.R
├── palette_parksAndRec.R
├── palette_gravityfalls.R
├── theme_spongebob.R
├── theme_simpsons.R
├── palette_hilda.R
└── palette_brooklyn99.R
├── tvthemes.Rproj
├── cran-comments.md
├── DESCRIPTION
├── _pkgdown.yml
├── CODE_OF_CONDUCT.md
├── NAMESPACE
└── NEWS.md
/.github/.gitignore:
--------------------------------------------------------------------------------
1 | *.html
2 |
--------------------------------------------------------------------------------
/vignettes/.gitignore:
--------------------------------------------------------------------------------
1 | *.html
2 | *.R
3 |
--------------------------------------------------------------------------------
/docs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/logo.png
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/favicon.ico
--------------------------------------------------------------------------------
/man/figures/hilda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/hilda.png
--------------------------------------------------------------------------------
/man/figures/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/logo.png
--------------------------------------------------------------------------------
/docs/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/favicon-16x16.png
--------------------------------------------------------------------------------
/docs/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/favicon-32x32.png
--------------------------------------------------------------------------------
/man/figures/stannis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/stannis.png
--------------------------------------------------------------------------------
/docs/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/apple-touch-icon.png
--------------------------------------------------------------------------------
/man/figures/bighero6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/bighero6.png
--------------------------------------------------------------------------------
/man/figures/bobspog.bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/bobspog.bg.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .Rproj.user
2 | .Rhistory
3 | .RData
4 | .Ruserdata
5 | *.txt
6 | inst/docs/
7 | inst/doc
8 |
--------------------------------------------------------------------------------
/docs/reference/Rplot001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/Rplot001.png
--------------------------------------------------------------------------------
/docs/reference/Rplot002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/Rplot002.png
--------------------------------------------------------------------------------
/docs/reference/Rplot003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/Rplot003.png
--------------------------------------------------------------------------------
/docs/reference/Rplot004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/Rplot004.png
--------------------------------------------------------------------------------
/docs/reference/Rplot005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/Rplot005.png
--------------------------------------------------------------------------------
/docs/reference/Rplot006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/Rplot006.png
--------------------------------------------------------------------------------
/man/figures/crystalgems.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/crystalgems.png
--------------------------------------------------------------------------------
/man/figures/gravityfalls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/gravityfalls.png
--------------------------------------------------------------------------------
/man/figures/kimpossible.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/kimpossible.png
--------------------------------------------------------------------------------
/man/figures/sponge_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/sponge_plot.png
--------------------------------------------------------------------------------
/pkgdown/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/pkgdown/favicon/favicon.ico
--------------------------------------------------------------------------------
/docs/apple-touch-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/apple-touch-icon-60x60.png
--------------------------------------------------------------------------------
/docs/apple-touch-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/apple-touch-icon-76x76.png
--------------------------------------------------------------------------------
/docs/reference/avatar_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/avatar_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/avatar_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/avatar_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/avatar_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/avatar_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/avatar_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/avatar_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/figures/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/logo.png
--------------------------------------------------------------------------------
/docs/reference/hilda_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/hilda_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/hilda_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/hilda_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/hilda_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/hilda_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/hilda_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/hilda_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/hilda_pal-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/hilda_pal-5.png
--------------------------------------------------------------------------------
/inst/backgrounds/aot-titan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/backgrounds/aot-titan.png
--------------------------------------------------------------------------------
/inst/fonts/Slayer/slayer11.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/fonts/Slayer/slayer11.TTF
--------------------------------------------------------------------------------
/man/figures/airnomads_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/airnomads_plot.png
--------------------------------------------------------------------------------
/man/figures/attackontitan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/attackontitan.png
--------------------------------------------------------------------------------
/man/figures/b99regpal_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/b99regpal_plot.png
--------------------------------------------------------------------------------
/man/figures/firenation_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/firenation_plot.png
--------------------------------------------------------------------------------
/man/figures/lastairbender.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/lastairbender.png
--------------------------------------------------------------------------------
/man/figures/rickmorty_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/rickmorty_plot.png
--------------------------------------------------------------------------------
/man/figures/simpsons_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/simpsons_plot.png
--------------------------------------------------------------------------------
/man/figures/stevenuniverse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/stevenuniverse.png
--------------------------------------------------------------------------------
/man/figures/watertribe_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/watertribe_plot.png
--------------------------------------------------------------------------------
/tests/testthat.R:
--------------------------------------------------------------------------------
1 | library(testthat)
2 | library(tvthemes)
3 | library(ggplot2)
4 |
5 | test_check("tvthemes")
6 |
--------------------------------------------------------------------------------
/docs/apple-touch-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/apple-touch-icon-120x120.png
--------------------------------------------------------------------------------
/docs/reference/bigHero6_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/bigHero6_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/bigHero6_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/bigHero6_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/bigHero6_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/bigHero6_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/bigHero6_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/bigHero6_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/figures/hilda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/hilda.png
--------------------------------------------------------------------------------
/docs/reference/simpsons_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/simpsons_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/simpsons_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/simpsons_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/simpsons_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/simpsons_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/simpsons_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/simpsons_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/theme_avatar-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_avatar-1.png
--------------------------------------------------------------------------------
/docs/reference/westeros_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/westeros_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/westeros_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/westeros_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/westeros_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/westeros_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/westeros_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/westeros_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/westeros_pal-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/westeros_pal-5.png
--------------------------------------------------------------------------------
/docs/reference/westeros_pal-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/westeros_pal-6.png
--------------------------------------------------------------------------------
/man/figures/earthkingdom_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/earthkingdom_plot.png
--------------------------------------------------------------------------------
/man/figures/parksandrec_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/parksandrec_both.png
--------------------------------------------------------------------------------
/pkgdown/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/pkgdown/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/pkgdown/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/pkgdown/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/docs/reference/brooklyn99_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/brooklyn99_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/brooklyn99_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/brooklyn99_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/brooklyn99_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/brooklyn99_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/brooklyn99_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/brooklyn99_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/brooklyn99_pal-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/brooklyn99_pal-5.png
--------------------------------------------------------------------------------
/docs/reference/brooklyn99_pal-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/brooklyn99_pal-6.png
--------------------------------------------------------------------------------
/docs/reference/figures/b99_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/b99_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/bighero6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/bighero6.png
--------------------------------------------------------------------------------
/docs/reference/figures/stannis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/stannis.png
--------------------------------------------------------------------------------
/docs/reference/kimPossible_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/kimPossible_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/kimPossible_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/kimPossible_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/kimPossible_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/kimPossible_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/kimPossible_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/kimPossible_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/parksAndRec_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/parksAndRec_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/parksAndRec_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/parksAndRec_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/parksAndRec_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/parksAndRec_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/parksAndRec_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/parksAndRec_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/spongeBob_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/spongeBob_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/spongeBob_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/spongeBob_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/spongeBob_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/spongeBob_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/spongeBob_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/spongeBob_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/theme_hildaDay-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_hildaDay-1.png
--------------------------------------------------------------------------------
/docs/reference/theme_hildaDusk-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_hildaDusk-1.png
--------------------------------------------------------------------------------
/docs/reference/theme_simpsons-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_simpsons-1.png
--------------------------------------------------------------------------------
/docs/reference/theme_spongeBob-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_spongeBob-1.png
--------------------------------------------------------------------------------
/inst/backgrounds/sponge-floral.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/backgrounds/sponge-floral.jpg
--------------------------------------------------------------------------------
/inst/fonts/Simpsons-Font/akbar.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/fonts/Simpsons-Font/akbar.ttf
--------------------------------------------------------------------------------
/man/figures/README-b99header-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/README-b99header-1.png
--------------------------------------------------------------------------------
/man/figures/arrynmanderlymartell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/arrynmanderlymartell.png
--------------------------------------------------------------------------------
/man/figures/starktullytargaryen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/starktullytargaryen.png
--------------------------------------------------------------------------------
/pkgdown/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/pkgdown/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/docs/reference/attackOnTitan_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/attackOnTitan_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/attackOnTitan_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/attackOnTitan_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/attackOnTitan_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/attackOnTitan_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/attackOnTitan_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/attackOnTitan_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/figures/bobspog.bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/bobspog.bg.png
--------------------------------------------------------------------------------
/docs/reference/figures/crystalgems.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/crystalgems.png
--------------------------------------------------------------------------------
/docs/reference/figures/kimpossible.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/kimpossible.png
--------------------------------------------------------------------------------
/docs/reference/figures/sponge_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/sponge_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/starks_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/starks_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/tully_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/tully_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/tyrell_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/tyrell_plot.png
--------------------------------------------------------------------------------
/docs/reference/gravityFalls_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/gravityFalls_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/gravityFalls_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/gravityFalls_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/gravityFalls_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/gravityFalls_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/gravityFalls_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/gravityFalls_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/rickAndMorty_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/rickAndMorty_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/rickAndMorty_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/rickAndMorty_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/rickAndMorty_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/rickAndMorty_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/rickAndMorty_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/rickAndMorty_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/theme_brooklyn99-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_brooklyn99-1.png
--------------------------------------------------------------------------------
/docs/reference/theme_hildaNight-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_hildaNight-1.png
--------------------------------------------------------------------------------
/docs/reference/theme_parksAndRec-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_parksAndRec-1.png
--------------------------------------------------------------------------------
/inst/backgrounds/sponge-background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/backgrounds/sponge-background.jpg
--------------------------------------------------------------------------------
/man/figures/tyrelllannistergreyjoy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/man/figures/tyrelllannistergreyjoy.png
--------------------------------------------------------------------------------
/docs/reference/figures/airnomads_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/airnomads_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/attackontitan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/attackontitan.png
--------------------------------------------------------------------------------
/docs/reference/figures/b99regpal_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/b99regpal_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/gravityfalls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/gravityfalls.png
--------------------------------------------------------------------------------
/docs/reference/figures/greyjoy_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/greyjoy_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/lastairbender.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/lastairbender.png
--------------------------------------------------------------------------------
/docs/reference/figures/rickmorty_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/rickmorty_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/simpsons_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/simpsons_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/stevenuniverse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/stevenuniverse.png
--------------------------------------------------------------------------------
/docs/reference/stevenUniverse_pal-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/stevenUniverse_pal-1.png
--------------------------------------------------------------------------------
/docs/reference/stevenUniverse_pal-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/stevenUniverse_pal-2.png
--------------------------------------------------------------------------------
/docs/reference/stevenUniverse_pal-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/stevenUniverse_pal-3.png
--------------------------------------------------------------------------------
/docs/reference/stevenUniverse_pal-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/stevenUniverse_pal-4.png
--------------------------------------------------------------------------------
/docs/reference/stevenUniverse_pal-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/stevenUniverse_pal-5.png
--------------------------------------------------------------------------------
/docs/reference/stevenUniverse_pal-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/stevenUniverse_pal-6.png
--------------------------------------------------------------------------------
/docs/reference/theme_rickAndMorty-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_rickAndMorty-1.png
--------------------------------------------------------------------------------
/inst/fonts/SpongeBob/Some-Time-Later.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/fonts/SpongeBob/Some-Time-Later.ttf
--------------------------------------------------------------------------------
/docs/reference/figures/firenation_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/firenation_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/lannisters_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/lannisters_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/parksandrec_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/parksandrec_both.png
--------------------------------------------------------------------------------
/docs/reference/figures/parksandrec_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/parksandrec_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/targaryens_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/targaryens_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/watertribe_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/watertribe_plot.png
--------------------------------------------------------------------------------
/docs/reference/theme_parksAndRecLight-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/theme_parksAndRecLight-1.png
--------------------------------------------------------------------------------
/inst/fonts/Rick-And-Morty/get_schwifty.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/fonts/Rick-And-Morty/get_schwifty.ttf
--------------------------------------------------------------------------------
/pkgdown/favicon/apple-touch-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/pkgdown/favicon/apple-touch-icon-60x60.png
--------------------------------------------------------------------------------
/pkgdown/favicon/apple-touch-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/pkgdown/favicon/apple-touch-icon-76x76.png
--------------------------------------------------------------------------------
/docs/reference/figures/README-b99header-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/README-b99header-1.png
--------------------------------------------------------------------------------
/docs/reference/figures/earthkingdom_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/earthkingdom_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/starktullytargaryen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/starktullytargaryen.png
--------------------------------------------------------------------------------
/docs/reference/figures/tvthemes-plots-img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/tvthemes-plots-img.png
--------------------------------------------------------------------------------
/docs/reference/figures/unnamed-chunk-2-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/unnamed-chunk-2-1.png
--------------------------------------------------------------------------------
/pkgdown/favicon/apple-touch-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/pkgdown/favicon/apple-touch-icon-120x120.png
--------------------------------------------------------------------------------
/docs/reference/figures/arrynmanderlymartell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/arrynmanderlymartell.png
--------------------------------------------------------------------------------
/docs/reference/figures/parksandreclight_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/parksandreclight_plot.png
--------------------------------------------------------------------------------
/docs/reference/figures/tyrelllannistergreyjoy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/reference/figures/tyrelllannistergreyjoy.png
--------------------------------------------------------------------------------
/inst/fonts/GravitationFalls/gravitation_falls.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/fonts/GravitationFalls/gravitation_falls.otf
--------------------------------------------------------------------------------
/inst/fonts/GravitationFalls/gravitation_falls.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/inst/fonts/GravitationFalls/gravitation_falls.ttf
--------------------------------------------------------------------------------
/docs/articles/fonts-and-colors_files/figure-html/unnamed-chunk-3-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/articles/fonts-and-colors_files/figure-html/unnamed-chunk-3-1.png
--------------------------------------------------------------------------------
/docs/articles/fonts-and-colors_files/figure-html/unnamed-chunk-3-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/articles/fonts-and-colors_files/figure-html/unnamed-chunk-3-2.png
--------------------------------------------------------------------------------
/docs/articles/fonts-and-colors_files/figure-html/unnamed-chunk-3-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/articles/fonts-and-colors_files/figure-html/unnamed-chunk-3-3.png
--------------------------------------------------------------------------------
/docs/articles/fonts-and-colors_files/figure-html/unnamed-chunk-3-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ryo-N7/tvthemes/HEAD/docs/articles/fonts-and-colors_files/figure-html/unnamed-chunk-3-4.png
--------------------------------------------------------------------------------
/.Rbuildignore:
--------------------------------------------------------------------------------
1 | ^docs$
2 | ^_pkgdown\.yml$
3 | ^\.github$
4 | ^CODE_OF_CONDUCT\.md$
5 | ^README\.Rmd$
6 | ^LICENSE\.md$
7 | ^.*\.Rproj$
8 | ^\.Rproj\.user$
9 | ^notes-todos\.txt$
10 | ^inst\docs\.Rmd$
11 | ^cran-comments\.md$
12 | ^CRAN-RELEASE$
13 | ^pkgdown$
14 | ^inst\test-generation-script.R$
15 | ^test-generation-script.R$
16 | ^CRAN-SUBMISSION$
17 |
--------------------------------------------------------------------------------
/R/onattach.R:
--------------------------------------------------------------------------------
1 | ## For tvthemes 1.0.0
2 | ## Only add for MAJOR version changes
3 |
4 | # .onAttach <- function(libname, pkgname) {
5 | # packageStartupMessage(
6 | # "Welcome to {tvthemes} 1.0.0! There's been a few changes to the palette functions ",
7 | # "so please take a look at the README on Github! (https://github.com/Ryo-N7/tvthemes)"
8 | # )
9 | # }
10 |
--------------------------------------------------------------------------------
/docs/pkgdown.yml:
--------------------------------------------------------------------------------
1 | pandoc: '2.18'
2 | pkgdown: 2.0.2
3 | pkgdown_sha: ~
4 | articles:
5 | examples: examples.html
6 | fonts-and-colors: fonts-and-colors.html
7 | tvthemes-1_0_0: tvthemes-1_0_0.html
8 | last_built: 2022-11-17T03:52Z
9 | urls:
10 | reference: https://ryo-n7.github.io/tvthemes/reference
11 | article: https://ryo-n7.github.io/tvthemes/articles
12 |
13 |
--------------------------------------------------------------------------------
/man/sponge_images.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/bikinibottom.R
3 | \name{sponge_images}
4 | \alias{sponge_images}
5 | \title{sponge_images}
6 | \usage{
7 | sponge_images(which = c("background", "floral"))
8 | }
9 | \arguments{
10 | \item{which}{Choose image, Default: c("background", "floral")}
11 | }
12 | \description{
13 | find SpongeBob background images
14 | }
15 | \keyword{internal}
16 |
--------------------------------------------------------------------------------
/tvthemes.Rproj:
--------------------------------------------------------------------------------
1 | Version: 1.0
2 |
3 | RestoreWorkspace: Default
4 | SaveWorkspace: Default
5 | AlwaysSaveHistory: Default
6 |
7 | EnableCodeIndexing: Yes
8 | UseSpacesForTab: Yes
9 | NumSpacesForTab: 2
10 | Encoding: UTF-8
11 |
12 | RnwWeave: Sweave
13 | LaTeX: pdfLaTeX
14 |
15 | AutoAppendNewline: Yes
16 | StripTrailingWhitespace: Yes
17 |
18 | BuildType: Package
19 | PackageUseDevtools: Yes
20 | PackageInstallArgs: --no-multiarch --with-keep.source
21 |
--------------------------------------------------------------------------------
/cran-comments.md:
--------------------------------------------------------------------------------
1 | ## Minor patch
2 |
3 | * Add @docType package
4 | * See [issue #22](https://github.com/Ryo-N7/tvthemes/issues/22)
5 | * Fix or delete discrete scale tests as per ggplot2 3.5.0 changes
6 |
7 | ## Test environments
8 | * local Windows 10 x64 install, R 4.0.5
9 | * Ubuntu Linux 20.04.1 (R-Hub), R 4.3
10 | * Fedora Linux, Debian Linux, R-devel, clang, gfortran (R-Hub)
11 | * win-builder (devel and release)
12 |
13 | ## R CMD check results
14 |
15 | 0 errors | 0 warnings | 0 notes
16 |
--------------------------------------------------------------------------------
/man/import_avatar.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/import_fonts.r
3 | \name{import_avatar}
4 | \alias{import_avatar}
5 | \title{Import "Slayer" font}
6 | \usage{
7 | import_avatar()
8 | }
9 | \description{
10 | The Last Airbender font ("Slayer")
11 | }
12 | \details{
13 | Actual font is Herculanum.
14 | import_*() functions taken from hrbrthemes.
15 | You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".
16 | }
17 |
--------------------------------------------------------------------------------
/man/import_spongeBob.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/import_fonts.r
3 | \name{import_spongeBob}
4 | \alias{import_spongeBob}
5 | \title{Import "Some-Time-Later" font}
6 | \usage{
7 | import_spongeBob()
8 | }
9 | \description{
10 | spongeBob SquarePants font ("Some-Time-Later")
11 | }
12 | \details{
13 | import_*() functions taken from hrbrthemes. Created by Frederick R. Brennan.
14 | You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".
15 | }
16 |
--------------------------------------------------------------------------------
/man/import_theLastAirbender.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/import_fonts.r
3 | \name{import_theLastAirbender}
4 | \alias{import_theLastAirbender}
5 | \title{Import "Slayer" font (deprecated)}
6 | \usage{
7 | import_theLastAirbender()
8 | }
9 | \description{
10 | The Last Airbender font ("Slayer")
11 | }
12 | \details{
13 | Actual font is Herculanum.
14 | import_*() functions taken from hrbrthemes.
15 | You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".
16 | }
17 |
--------------------------------------------------------------------------------
/man/import_simpsons.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/import_fonts.r
3 | \name{import_simpsons}
4 | \alias{import_simpsons}
5 | \title{Import "Akbar" font}
6 | \usage{
7 | import_simpsons()
8 | }
9 | \description{
10 | The Simpsons Font ("Akbar" font)
11 | }
12 | \details{
13 | import_*() functions taken from hrbrthemes.
14 | Created by Jon Bernhardt.
15 | You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".
16 | }
17 | \seealso{
18 | \code{\link[extrafont]{font_import}}
19 | }
20 |
--------------------------------------------------------------------------------
/tests/testthat/test-fonts.R:
--------------------------------------------------------------------------------
1 | test_that("fonts install", {
2 | testthat::skip_on_cran()
3 | # invisible(import_roboto_condensed())
4 | #invisible(import_ChelseaMarket())
5 | # invisible(import_cinzel())
6 | invisible(import_rickAndMorty())
7 | invisible(import_simpsons())
8 | invisible(import_spongeBob())
9 | # invisible(import_titillium_web())
10 | invisible(import_gravitationFalls())
11 | ## camelCase
12 | # invisible(import_robotoCondensed())
13 | # invisible(import_chelseaMarket())
14 | invisible(import_avatar())
15 | # invisible(import_titilliumWeb())
16 | })
17 |
--------------------------------------------------------------------------------
/man/import_rickAndMorty.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/import_fonts.r
3 | \name{import_rickAndMorty}
4 | \alias{import_rickAndMorty}
5 | \title{Import "Get Schwifty" font}
6 | \usage{
7 | import_rickAndMorty()
8 | }
9 | \description{
10 | Rick & Morty font ("Get Schwifty")
11 | }
12 | \details{
13 | Actual font is ... well, Justin Roiland's actual handwriting.
14 | import_*() functions taken from hrbrthemes.
15 | Created by jonizaak on DeviantArt!
16 | You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".
17 | }
18 |
--------------------------------------------------------------------------------
/man/import_gravitationFalls.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/import_fonts.r
3 | \name{import_gravitationFalls}
4 | \alias{import_gravitationFalls}
5 | \title{Import "Gravitation Falls" font}
6 | \usage{
7 | import_gravitationFalls()
8 | }
9 | \description{
10 | Imports Gravitation Falls font (Gravity Falls)
11 | }
12 | \details{
13 | import_*() functions taken from hrbrthemes.
14 | Font made by MaxiGamer on DeviantArt!
15 | You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".
16 | }
17 | \seealso{
18 | \code{\link[extrafont]{font_import}}
19 | }
20 |
--------------------------------------------------------------------------------
/inst/WORDLIST:
--------------------------------------------------------------------------------
1 | ’s
2 | Airbender
3 | blogpost
4 | brooklyn
5 | Calibri
6 | cinzel
7 | Cinzel
8 | FEFF
9 | FFD
10 | ffffff
11 | Fire’
12 | ggplot
13 | ggpomological's
14 | Github
15 | grey
16 | Greyjoy
17 | Herculanum
18 | hrbrthemes
19 | HTF
20 | Lannister
21 | Lifecycle
22 | magick
23 | md
24 | Morty
25 | nathancunn
26 | paintBikiniBottom
27 | PARAM
28 | parksAndRec
29 | pomological
30 | repo
31 | rickAndMorty
32 | roboto
33 | Roboto
34 | Roiland's
35 | Schwifty
36 | simpsons
37 | Spongbobify
38 | spongeBob
39 | Spongebob
40 | SpongeBob
41 | Squarepants
42 | SquarePants
43 | Targaryen
44 | theLastAirbender
45 | titillium
46 | Titillium
47 | ttf
48 | Tully
49 | Tyrell
50 | Univers
51 |
--------------------------------------------------------------------------------
/docs/link.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
--------------------------------------------------------------------------------
/man/paintBikiniBottom.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/bikinibottom.R
3 | \name{paintBikiniBottom}
4 | \alias{paintBikiniBottom}
5 | \title{Add SpongeBob background}
6 | \usage{
7 | paintBikiniBottom(
8 | plot,
9 | width = 800,
10 | height = 500,
11 | output.file = NULL,
12 | background = "background",
13 | ...
14 | )
15 | }
16 | \arguments{
17 | \item{plot}{the ggplot object you want to Spongbobify!}
18 |
19 | \item{width}{width, Default: 800}
20 |
21 | \item{height}{height, Default: 500}
22 |
23 | \item{output.file}{File path to save image, Default: NULL}
24 |
25 | \item{background}{"background" or "floral", Default: "background"}
26 |
27 | \item{...}{Other options, see `?magick::image_graph()`}
28 | }
29 | \value{
30 | Your plot with a Spongebob themed background!
31 | }
32 | \description{
33 | Add SpongeBob background
34 | }
35 | \details{
36 | Adapted from ggpomological's `paint_pomological()` function!
37 | }
38 |
--------------------------------------------------------------------------------
/docs/extra.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css?family=Titillium+Web&display=swap');
2 | @import url("https://cdn.rawgit.com/tonsky/FiraCode/1.205/distr/fira_code.css");
3 |
4 | body, .navbar-inverse {
5 | font-family: 'Titillium Web', sans-serif;
6 | font-weight: 400;
7 | }
8 |
9 | h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
10 | font-family: 'Titillium Web Bold', sans-serif;
11 | font-weight: 700;
12 | color: #222324;
13 | }
14 |
15 | pre, code {
16 | font-family: "Fira Code", Consolas, Inconsolata, monospace;
17 | }
18 |
19 | .label-default {
20 | background-color: transparent;
21 | }
22 |
23 | .navbar-inverse {
24 | background-color: #78A8D1;
25 | border-color: transparent;
26 | min-height: 50px;
27 | }
28 |
29 | .navbar-brand {
30 | background-image: url(logo.png);
31 | background-size: 32px auto;
32 | background-repeat: no-repeat;
33 | background-position: 15px center;
34 | padding: 0 0 0 54px;
35 | height: 50px;
36 | line-height: 50px;
37 | }
38 |
--------------------------------------------------------------------------------
/pkgdown/extra.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css?family=Titillium+Web&display=swap');
2 | @import url("https://cdn.rawgit.com/tonsky/FiraCode/1.205/distr/fira_code.css");
3 |
4 | body, .navbar-inverse {
5 | font-family: 'Titillium Web', sans-serif;
6 | font-weight: 400;
7 | }
8 |
9 | h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
10 | font-family: 'Titillium Web Bold', sans-serif;
11 | font-weight: 700;
12 | color: #222324;
13 | }
14 |
15 | pre, code {
16 | font-family: "Fira Code", Consolas, Inconsolata, monospace;
17 | }
18 |
19 | .label-default {
20 | background-color: transparent;
21 | }
22 |
23 | .navbar-inverse {
24 | background-color: #78A8D1;
25 | border-color: transparent;
26 | min-height: 50px;
27 | }
28 |
29 | .navbar-brand {
30 | background-image: url(logo.png);
31 | background-size: 32px auto;
32 | background-repeat: no-repeat;
33 | background-position: 15px center;
34 | padding: 0 0 0 54px;
35 | height: 50px;
36 | line-height: 50px;
37 | }
38 |
--------------------------------------------------------------------------------
/.github/workflows/pkgdown.yaml:
--------------------------------------------------------------------------------
1 | # Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2 | # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3 | on:
4 | push:
5 | branches: [main, master]
6 | release:
7 | types: [published]
8 | workflow_dispatch:
9 |
10 | name: pkgdown
11 |
12 | jobs:
13 | pkgdown:
14 | runs-on: ubuntu-latest
15 | env:
16 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
17 | steps:
18 | - uses: actions/checkout@v2
19 |
20 | - uses: r-lib/actions/setup-pandoc@v1
21 |
22 | - uses: r-lib/actions/setup-r@v1
23 | with:
24 | use-public-rspm: true
25 |
26 | - uses: r-lib/actions/setup-r-dependencies@v1
27 | with:
28 | extra-packages: pkgdown
29 | needs: website
30 |
31 | - name: Deploy package
32 | run: |
33 | git config --local user.name "$GITHUB_ACTOR"
34 | git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
35 | Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
36 |
--------------------------------------------------------------------------------
/DESCRIPTION:
--------------------------------------------------------------------------------
1 | Type: Package
2 | Package: tvthemes
3 | Title: TV Show Themes and Color Palettes for 'ggplot2' Graphics
4 | Version: 1.3.3
5 | Authors@R:
6 | person(given = "Ryo",
7 | family = "Nakagawara",
8 | role = c("aut", "cre"),
9 | email = "ryonakagawara@gmail.com")
10 | Maintainer: Ryo Nakagawara
11 | Description: Contains various 'ggplot2' themes and color palettes based on TV shows
12 | such as 'Game of Thrones', 'Brooklyn Nine-Nine', 'Avatar: The Last Airbender',
13 | 'Spongebob Squarepants', and more.
14 | License: GPL-3
15 | Encoding: UTF-8
16 | RoxygenNote: 7.2.3
17 | Imports:
18 | ggplot2 (>= 3.1.0),
19 | extrafont (>= 0.17),
20 | scales (>= 1.0.0),
21 | magick (>= 2.0),
22 | grDevices (>= 3.5.3)
23 | Suggests:
24 | testthat (>= 2.1.1),
25 | dplyr (>= 0.8.0.1),
26 | cowplot (>= 0.9.4),
27 | png (>= 0.1-7),
28 | glue (>= 1.3.1),
29 | stringr,
30 | knitr,
31 | rmarkdown
32 | URL: https://github.com/Ryo-N7/tvthemes
33 | BugReports: https://github.com/Ryo-N7/tvthemes/issues
34 | Language: en-US
35 | VignetteBuilder: knitr
36 |
--------------------------------------------------------------------------------
/R/tvthemes-package.R:
--------------------------------------------------------------------------------
1 | #' TV Show Themes and Color Palettes for 'ggplot2' Graphics
2 | #'
3 | #' Contains various 'ggplot2' themes and color palettes based on TV shows.
4 | #'
5 | #' - Avatar: The Last Airbender: theme + palettes (Fire Nation, Water Tribe,
6 | #' Earth Kingdom, & Air Nomads)
7 | #' - Brooklyn Nine-Nine: theme + palettes (regular & dark)
8 | #' - Game of Thrones/A Song of Ice & Fire: ‘The Palettes of Ice & Fire’
9 | #' (currently: Stark, Baratheon (Stannis), Lannister, Tully, Targaryen, Martell,
10 | #' Greyjoy, Tyrell, Arryn, & Manderly)
11 | #' - Rick & Morty: theme + palette
12 | #' - Parks & Recreation: two themes (light & dark) + palette
13 | #' - The Simpsons: theme + palette
14 | #' - Spongebob Squarepants: theme + palette + background images
15 | #' - Hilda (Day, Dusk, Night) themes + palettes
16 | #' - Attack on Titan: palette
17 | #' - Kim Possible: palette
18 | #' - Big Hero 6: palette
19 | #'
20 | #' Most palettes are geared toward 'discrete' scales rather than 'continuous' so
21 | #' the option isn't available in the functions. This may change in the future.
22 | #' @seealso
23 | #' - https://ryo-n7.github.io/2019-05-16-introducing-tvthemes-package/
24 | #' - https://github.com/Ryo-N7/tvthemes
25 | #' @md
26 | #' @name tvthemes
27 | #' @docType package
28 | #' @aliases tvthemes-package
29 | #' @author Ryo Nakagawara (@@R_by_Ryo)
30 | #' @keywords internal
31 |
32 | NULL
33 |
--------------------------------------------------------------------------------
/.github/workflows/test-coverage.yaml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | branches:
4 | - master
5 | pull_request:
6 | branches:
7 | - master
8 |
9 | name: test-coverage
10 |
11 | jobs:
12 | test-coverage:
13 | runs-on: macOS-latest
14 | env:
15 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16 | steps:
17 | - uses: actions/checkout@v2
18 |
19 | - uses: r-lib/actions/setup-r@master
20 |
21 | - uses: r-lib/actions/setup-pandoc@master
22 |
23 | - name: Query dependencies
24 | run: |
25 | install.packages('remotes')
26 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
27 | writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
28 | shell: Rscript {0}
29 |
30 | - name: Cache R packages
31 | uses: actions/cache@v1
32 | with:
33 | path: ${{ env.R_LIBS_USER }}
34 | key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
35 | restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
36 |
37 | - name: Install dependencies
38 | run: |
39 | install.packages(c("remotes"))
40 | remotes::install_deps(dependencies = TRUE)
41 | remotes::install_cran("covr")
42 | shell: Rscript {0}
43 |
44 | - name: Test coverage
45 | run: covr::codecov(token = "${{secrets.CODECOV}}")
46 | shell: Rscript {0}
47 |
--------------------------------------------------------------------------------
/man/tvthemes.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/tvthemes-package.R
3 | \docType{package}
4 | \name{tvthemes}
5 | \alias{tvthemes}
6 | \alias{tvthemes-package}
7 | \title{TV Show Themes and Color Palettes for 'ggplot2' Graphics}
8 | \description{
9 | Contains various 'ggplot2' themes and color palettes based on TV shows.
10 | }
11 | \details{
12 | \itemize{
13 | \item Avatar: The Last Airbender: theme + palettes (Fire Nation, Water Tribe,
14 | Earth Kingdom, & Air Nomads)
15 | \item Brooklyn Nine-Nine: theme + palettes (regular & dark)
16 | \item Game of Thrones/A Song of Ice & Fire: ‘The Palettes of Ice & Fire’
17 | (currently: Stark, Baratheon (Stannis), Lannister, Tully, Targaryen, Martell,
18 | Greyjoy, Tyrell, Arryn, & Manderly)
19 | \item Rick & Morty: theme + palette
20 | \item Parks & Recreation: two themes (light & dark) + palette
21 | \item The Simpsons: theme + palette
22 | \item Spongebob Squarepants: theme + palette + background images
23 | \item Hilda (Day, Dusk, Night) themes + palettes
24 | \item Attack on Titan: palette
25 | \item Kim Possible: palette
26 | \item Big Hero 6: palette
27 | }
28 |
29 | Most palettes are geared toward 'discrete' scales rather than 'continuous' so
30 | the option isn't available in the functions. This may change in the future.
31 | }
32 | \seealso{
33 | \itemize{
34 | \item https://ryo-n7.github.io/2019-05-16-introducing-tvthemes-package/
35 | \item https://github.com/Ryo-N7/tvthemes
36 | }
37 | }
38 | \author{
39 | Ryo Nakagawara (@R_by_Ryo)
40 | }
41 | \keyword{internal}
42 |
--------------------------------------------------------------------------------
/tests/testthat/test-bighero6.R:
--------------------------------------------------------------------------------
1 | context("test-bighero6")
2 |
3 | expect_eqNe <- function(...) expect_equal(..., check.environment=FALSE)
4 | expect_equal_scales <- function(x, y, ...) {
5 | x <- as.list(x)
6 | y <- as.list(y)
7 | x$call <- y$call <- NULL
8 | expect_equal(x, y, ...)
9 | }
10 |
11 | ## Big Hero 6
12 | test_that("bigHero6_pal raises warning with large number, x > 8", {
13 | expect_warning(bigHero6_pal()(9))
14 | expect_warning(bigHero6_pal(reverse = TRUE)(9))
15 | expect_error(bigHero6_pal(n = 9))
16 | })
17 |
18 | # test_that("scale_colour_bigHero6 equals scale_color_bigHero6", {
19 | # expect_equal_scales(scale_color_bigHero6(), scale_colour_bigHero6())
20 | # })
21 |
22 | # test_that("scale_colour_bigHero6 works", {
23 | # expect_is(scale_color_bigHero6(), "ScaleDiscrete")
24 | # })
25 |
26 | # test_that("scale_fill_bigHero6 works", {
27 | # expect_is(scale_fill_bigHero6(), "ScaleDiscrete")
28 | # })
29 |
30 | test_that("scale_color_bigHero6 outputs correct colors", {
31 | expect_equal(bigHero6_pal()(8),
32 | c( "#ffff33", ## gogo yellow #ffff1a #ffff19
33 | "#ffa500", ## honeylemon/fredzilla orange
34 | "#4F366F", ## baymax/hiro darkpurple
35 | "#ff0000", ## baymax red
36 | "#00fa9a", ## wasabi green
37 | "#3177D5", ## fredzilla blue #50F2F7
38 | "#c71585", ## honey lemon violet #9400d3 #ff00ff #C70039 #c71585
39 | "#000000" ## black
40 | ))
41 | })
42 |
--------------------------------------------------------------------------------
/tests/testthat/test-attackontitan.R:
--------------------------------------------------------------------------------
1 | context("test-attackontitan")
2 |
3 | expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE)
4 | expect_equal_scales <- function(x, y, ...) {
5 | x <- as.list(x)
6 | y <- as.list(y)
7 | x$call <- y$call <- NULL
8 | expect_equal(x, y, ...)
9 | }
10 |
11 | ## Attack on Titan
12 | test_that("attackOnTitan_pal raises warning with large number, x > 8", {
13 | expect_warning(attackOnTitan_pal()(9))
14 | expect_warning(attackOnTitan_pal(reverse = TRUE)(9))
15 | expect_error(attackOnTitan_pal(n = 9))
16 | })
17 |
18 | # test_that("scale_colour_attackOnTitan equals scale_color_attackOnTitan", {
19 | # expect_equal_scales(scale_color_attackOnTitan(), scale_colour_attackOnTitan())
20 | # })
21 |
22 | # test_that("scale_colour_attackOnTitan works", {
23 | # expect_is(scale_color_attackOnTitan(), "ScaleDiscrete")
24 | # })
25 |
26 | # test_that("scale_fill_attackOnTitan works", {
27 | # expect_is(scale_fill_attackOnTitan(), "ScaleDiscrete")
28 | # })
29 |
30 | test_that("attackOnTitan outputs correct colors", {
31 | expect_equal(attackOnTitan_pal()(8),
32 | c( "#004c00", ## cape green #42694a #004c00 #004000 #3C4D3D
33 | "#173357", ## survey corp blue
34 | "#3E1E13", ## jacket brown lightbrown #6f553f
35 | "#e50000", ## titan red #BF2F1F
36 | "#999BA0", ## blade steel
37 | "#c8a780", ## jacket lighttan
38 | "#EB6154", ## titan skin pink
39 | "#000000" ## black
40 | ))
41 | })
42 |
--------------------------------------------------------------------------------
/tests/testthat/test-kimpossible.R:
--------------------------------------------------------------------------------
1 | context("test-kimpossible")
2 |
3 | expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE)
4 | expect_equal_scales <- function(x, y, ...) {
5 | x <- as.list(x)
6 | y <- as.list(y)
7 | x$call <- y$call <- NULL
8 | expect_equal(x, y, ...)
9 | }
10 |
11 | ## Kim Possible
12 | test_that("kimPossible_pal raises warning with large number, x > 12", {
13 | expect_warning(kimPossible_pal()(13))
14 | expect_warning(kimPossible_pal(reverse = TRUE)(13))
15 | expect_error(kimPossible_pal(n = 13))
16 | })
17 |
18 | # test_that("scale_colour_kimPossible equals scale_color_kimPossible", {
19 | # expect_equal_scales(scale_color_kimPossible(), scale_colour_kimPossible())
20 | # })
21 | #
22 | # test_that("scale_colour_kimPossible works", {
23 | # expect_is(scale_color_kimPossible(), "ScaleDiscrete")
24 | # })
25 | #
26 | # test_that("scale_fill_kimPossible works", {
27 | # expect_is(scale_fill_kimPossible(), "ScaleDiscrete")
28 | # })
29 |
30 | ## Colors are correct ----
31 | test_that("scale_color_kimPossible outputs correct colors", {
32 | expect_equal(kimPossible_pal()(12),
33 | c("#FF8C00", ## KP orange #A75422
34 | "#024663", ## Drakken blue
35 | "#70D423", ## Shego green
36 | "#891604", ## Ron red/burgundy
37 | "#02001F", ## Ron navy
38 | "#9CF6F7", ## KP supersuit lightblue
39 | "#FFCE45", ## Ron yellow hair
40 | "#5D734D", ## KP green eyes
41 | "#FEC3BB", ## Rufus pink
42 | "#662C9C", ## S4 KP combat purple
43 | "#fff9f5", ## white
44 | "#000000" ## black
45 | ))
46 | })
47 |
--------------------------------------------------------------------------------
/inst/test-generation-script.R:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ## DATA ----
5 |
6 | pal_names <- stevenUniverse_palette %>% names()
7 | pal_num <- map(stevenUniverse_palette, ~ length(.x)) %>% unlist() %>% unname()
8 |
9 | names_df <- data.frame(
10 | "names" = pal_names,
11 | "num" = pal_num,
12 | "numplustwo" = pal_num + 2
13 | )
14 |
15 | ## START ----
16 |
17 | fileName <- here::here("tests/testthat/test-SU.R")
18 |
19 | message(sprintf("Writing %s...", fileName))
20 | r <- file(fileName, open = "w")
21 |
22 |
23 |
24 | for (i in 1:nrow(names_df)) {
25 | cat(file = r, sprintf("### %s ----\n\n",
26 | names_df$names[[i]]))
27 |
28 | cat(file = r,
29 | sprintf(
30 | "test_that('%s_pal raises warning with large number, x > %s', {
31 | expect_warning(stevenUniverse_pal(palette = '%s')(%s))
32 | expect_warning(stevenUniverse_pal(palette = '%s', reverse = TRUE)(%s))
33 | expect_error(stevenUniverse_pal(palette = '%s', n = %s))
34 | })\n\n",
35 | names_df$names[[i]],
36 | names_df$num[[i]],
37 | names_df$names[[i]],
38 | names_df$numplustwo[[i]],
39 | names_df$names[[i]],
40 | names_df$numplustwo[[i]],
41 | names_df$names[[i]],
42 | names_df$numplustwo[[i]]))
43 |
44 | cat(file = r,
45 | sprintf("test_that('scale_colour_Steven equals scale_color_%s', {
46 | expect_equal(scale_color_stevenUniverse(palette = '%s'), scale_colour_stevenUniverse(palette = '%s'))
47 | })\n\n",
48 | names_df$names[[i]],
49 | names_df$names[[i]],
50 | names_df$names[[i]]))
51 |
52 | cat(file = r, sprintf("test_that('scale_colour_%s works', {
53 | expect_is(scale_color_stevenUniverse(palette = '%s'), 'ScaleDiscrete')
54 | })\n\n",
55 | names_df$names[[i]],
56 | names_df$names[[i]]))
57 |
58 | cat(file = r, sprintf("test_that('scale_fill_%s works', {
59 | expect_is(scale_fill_stevenUniverse(palette = '%s'), 'ScaleDiscrete')
60 | })\n\n",
61 | names_df$names[[i]],
62 | names_df$names[[i]]))
63 | }
64 |
65 | close(r)
66 |
--------------------------------------------------------------------------------
/tests/testthat/test-gravityfalls.R:
--------------------------------------------------------------------------------
1 | context("test-gravityFalls")
2 |
3 | expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE)
4 | expect_equal_scales <- function(x, y, ...) {
5 | x <- as.list(x)
6 | y <- as.list(y)
7 | x$call <- y$call <- NULL
8 | expect_equal(x, y, ...)
9 | }
10 |
11 | ## Big Hero 6
12 | test_that("gravityFalls_pal raises warning with large number, x > 15", {
13 | expect_warning(gravityFalls_pal()(15))
14 | expect_warning(gravityFalls_pal(reverse = TRUE)(15))
15 | expect_error(gravityFalls_pal(n = 15))
16 | })
17 |
18 | # test_that("scale_colour_gravityFalls equals scale_color_gravityFalls", {
19 | # expect_equal_scales(scale_color_gravityFalls(), scale_colour_gravityFalls())
20 | # })
21 | #
22 | # test_that("scale_colour_gravityFalls works", {
23 | # expect_is(scale_color_gravityFalls(), "ScaleDiscrete")
24 | # })
25 | #
26 | # test_that("scale_fill_gravityFalls works", {
27 | # expect_is(scale_fill_gravityFalls(), "ScaleDiscrete")
28 | # })
29 |
30 | test_that("scale_color_gravityFalls outputs correct colors", {
31 | expect_equal(gravityFalls_pal()(14),
32 | c( "#417BA1", ## dipper light blue
33 | "#ff1493", ## mabel pink #DF504C
34 | "#ffff2e", ## bill cipher yellow #ffff2e #fff400
35 | "#345634", ## soos green
36 | "#8b0000", ## fez burgundy #8b0000 #732335
37 | "#ff6700", ## wendy orange
38 | "#93C0D5", ## lil gideon skyblue
39 | "#8b4513", ## mcgucket brown #8b4513 #8E6537
40 | "#9248A7", ## pacifica purple
41 | "#1c8859", ## wendy green
42 | "#474747", ## grunkle grey
43 | "#8fbc8f", ## sheriff blubs green
44 | "#d2b48c", ## stanford coat beige #d2b48c #dfbe58
45 | "#000000" ## robbie black
46 | ))
47 | })
48 |
--------------------------------------------------------------------------------
/docs/bootstrap-toc.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/)
3 | * Copyright 2015 Aidan Feldman
4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */
5 |
6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */
7 |
8 | /* All levels of nav */
9 | nav[data-toggle='toc'] .nav > li > a {
10 | display: block;
11 | padding: 4px 20px;
12 | font-size: 13px;
13 | font-weight: 500;
14 | color: #767676;
15 | }
16 | nav[data-toggle='toc'] .nav > li > a:hover,
17 | nav[data-toggle='toc'] .nav > li > a:focus {
18 | padding-left: 19px;
19 | color: #563d7c;
20 | text-decoration: none;
21 | background-color: transparent;
22 | border-left: 1px solid #563d7c;
23 | }
24 | nav[data-toggle='toc'] .nav > .active > a,
25 | nav[data-toggle='toc'] .nav > .active:hover > a,
26 | nav[data-toggle='toc'] .nav > .active:focus > a {
27 | padding-left: 18px;
28 | font-weight: bold;
29 | color: #563d7c;
30 | background-color: transparent;
31 | border-left: 2px solid #563d7c;
32 | }
33 |
34 | /* Nav: second level (shown on .active) */
35 | nav[data-toggle='toc'] .nav .nav {
36 | display: none; /* Hide by default, but at >768px, show it */
37 | padding-bottom: 10px;
38 | }
39 | nav[data-toggle='toc'] .nav .nav > li > a {
40 | padding-top: 1px;
41 | padding-bottom: 1px;
42 | padding-left: 30px;
43 | font-size: 12px;
44 | font-weight: normal;
45 | }
46 | nav[data-toggle='toc'] .nav .nav > li > a:hover,
47 | nav[data-toggle='toc'] .nav .nav > li > a:focus {
48 | padding-left: 29px;
49 | }
50 | nav[data-toggle='toc'] .nav .nav > .active > a,
51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a,
52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a {
53 | padding-left: 28px;
54 | font-weight: 500;
55 | }
56 |
57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */
58 | nav[data-toggle='toc'] .nav > .active > ul {
59 | display: block;
60 | }
61 |
--------------------------------------------------------------------------------
/man/theme_theLastAirbender.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_thelastairbender.R
3 | \name{theme_theLastAirbender}
4 | \alias{theme_theLastAirbender}
5 | \title{Avatar: The Last Airbender theme (deprecated)}
6 | \usage{
7 | theme_theLastAirbender(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 14,
12 | text.size = 10,
13 | subtitle.size = 12,
14 | axis.title.size = 10,
15 | axis.text.size = 8,
16 | legend.title.size = 10,
17 | legend.text.size = 8,
18 | title.color = NULL,
19 | subtitle.color = "grey20",
20 | text.color = NULL,
21 | axis.title.color = "grey20",
22 | axis.text.color = "grey20",
23 | legend.title.color = "grey20",
24 | legend.text.color = "grey20",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{title font size, Default: 14}
37 |
38 | \item{text.size}{text font size, Default: 10}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 12}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 10}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 8}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 8}
49 |
50 | \item{title.color}{title color, Default: NULL}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: "grey20"}
53 |
54 | \item{text.color}{text color, Default: NULL}
55 |
56 | \item{axis.title.color}{axis title color, Default: "grey20"}
57 |
58 | \item{axis.text.color}{axis text color, Default: "grey20"}
59 |
60 | \item{legend.title.color}{legend title color, Default: "grey20"}
61 |
62 | \item{legend.text.color}{legend text color, Default: "grey20"}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Avatar: The Last Airbender theme, Recommended font: "Slayer"
70 | }
71 | \seealso{
72 | [ggplot2::theme]
73 | }
74 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to tvthemes
2 |
3 | This outlines how to propose a change to tvthemes. For more detailed
4 | info about contributing to this, and other tidyverse packages, please see the
5 | [**development contributing guide**](https://rstd.io/tidy-contrib).
6 |
7 | ### Fixing typos
8 |
9 | Small typos or grammatical errors in documentation may be edited directly using
10 | the GitHub web interface, so long as the changes are made in the _source_ file.
11 |
12 | * YES: you edit a roxygen comment in a `.R` file below `R/`.
13 | * NO: you edit an `.Rd` file below `man/`.
14 |
15 | ### Prerequisites
16 |
17 | Before you make a substantial pull request, you should always file an issue and
18 | make sure someone from the team agrees that it’s a problem. If you’ve found a
19 | bug, create an associated issue and illustrate the bug with a minimal
20 | [reprex](https://www.tidyverse.org/help/#reprex).
21 |
22 | ### Pull request process
23 |
24 | * We recommend that you create a Git branch for each pull request (PR).
25 | * Look at the Travis and AppVeyor build status before and after making changes.
26 | The `README` should contain badges for any continuous integration services used
27 | by the package.
28 | * New code should follow the tidyverse [style guide](http://style.tidyverse.org).
29 | You can use the [styler](https://CRAN.R-project.org/package=styler) package to
30 | apply these styles, but please don't restyle code that has nothing to do with
31 | your PR.
32 | * We use [roxygen2](https://cran.r-project.org/package=roxygen2), with
33 | [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/markdown.html),
34 | for documentation.
35 | * We use [testthat](https://cran.r-project.org/package=testthat). Contributions
36 | with test cases included are easier to accept.
37 | * For user-facing changes, add a bullet to the top of `NEWS.md` below the
38 | current development version header describing the changes made followed by your
39 | GitHub username, and links to relevant issue(s)/PR(s).
40 |
41 | ### Code of Conduct
42 |
43 | Please note that the tvthemes project is released with a
44 | [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this
45 | project you agree to abide by its terms.
46 |
47 | ### See tidyverse [development contributing guide](https://rstd.io/tidy-contrib)
48 | for further details.
49 |
--------------------------------------------------------------------------------
/docs/docsearch.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 |
3 | // register a handler to move the focus to the search bar
4 | // upon pressing shift + "/" (i.e. "?")
5 | $(document).on('keydown', function(e) {
6 | if (e.shiftKey && e.keyCode == 191) {
7 | e.preventDefault();
8 | $("#search-input").focus();
9 | }
10 | });
11 |
12 | $(document).ready(function() {
13 | // do keyword highlighting
14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */
15 | var mark = function() {
16 |
17 | var referrer = document.URL ;
18 | var paramKey = "q" ;
19 |
20 | if (referrer.indexOf("?") !== -1) {
21 | var qs = referrer.substr(referrer.indexOf('?') + 1);
22 | var qs_noanchor = qs.split('#')[0];
23 | var qsa = qs_noanchor.split('&');
24 | var keyword = "";
25 |
26 | for (var i = 0; i < qsa.length; i++) {
27 | var currentParam = qsa[i].split('=');
28 |
29 | if (currentParam.length !== 2) {
30 | continue;
31 | }
32 |
33 | if (currentParam[0] == paramKey) {
34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20"));
35 | }
36 | }
37 |
38 | if (keyword !== "") {
39 | $(".contents").unmark({
40 | done: function() {
41 | $(".contents").mark(keyword);
42 | }
43 | });
44 | }
45 | }
46 | };
47 |
48 | mark();
49 | });
50 | });
51 |
52 | /* Search term highlighting ------------------------------*/
53 |
54 | function matchedWords(hit) {
55 | var words = [];
56 |
57 | var hierarchy = hit._highlightResult.hierarchy;
58 | // loop to fetch from lvl0, lvl1, etc.
59 | for (var idx in hierarchy) {
60 | words = words.concat(hierarchy[idx].matchedWords);
61 | }
62 |
63 | var content = hit._highlightResult.content;
64 | if (content) {
65 | words = words.concat(content.matchedWords);
66 | }
67 |
68 | // return unique words
69 | var words_uniq = [...new Set(words)];
70 | return words_uniq;
71 | }
72 |
73 | function updateHitURL(hit) {
74 |
75 | var words = matchedWords(hit);
76 | var url = "";
77 |
78 | if (hit.anchor) {
79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor;
80 | } else {
81 | url = hit.url + '?q=' + escape(words.join(" "));
82 | }
83 |
84 | return url;
85 | }
86 |
--------------------------------------------------------------------------------
/man/theme_avatar.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_thelastairbender.R
3 | \name{theme_avatar}
4 | \alias{theme_avatar}
5 | \title{Avatar: The Last Airbender theme}
6 | \usage{
7 | theme_avatar(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 14,
12 | text.size = 10,
13 | subtitle.size = 12,
14 | axis.title.size = 10,
15 | axis.text.size = 8,
16 | legend.title.size = 10,
17 | legend.text.size = 8,
18 | title.color = NULL,
19 | subtitle.color = "grey20",
20 | text.color = NULL,
21 | axis.title.color = "grey20",
22 | axis.text.color = "grey20",
23 | legend.title.color = "grey20",
24 | legend.text.color = "grey20",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{title font size, Default: 14}
37 |
38 | \item{text.size}{text font size, Default: 10}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 12}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 10}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 8}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 8}
49 |
50 | \item{title.color}{title color, Default: NULL}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: "grey20"}
53 |
54 | \item{text.color}{text color, Default: NULL}
55 |
56 | \item{axis.title.color}{axis title color, Default: "grey20"}
57 |
58 | \item{axis.text.color}{axis text color, Default: "grey20"}
59 |
60 | \item{legend.title.color}{legend title color, Default: "grey20"}
61 |
62 | \item{legend.text.color}{legend text color, Default: "grey20"}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Avatar: The Last Airbender theme, Recommended font: "Slayer"
70 | }
71 | \examples{
72 | library(ggplot2)
73 |
74 | ggplot(airquality, aes(x = Day, y = Temp,
75 | group = as.factor(Month), color = as.factor(Month))) +
76 | geom_point(size = 2.5) +
77 | scale_color_avatar() +
78 | theme_avatar()
79 | }
80 | \seealso{
81 | [ggplot2::theme]
82 | }
83 |
--------------------------------------------------------------------------------
/man/theme_parksAndRec_light.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_parksAndRec.R
3 | \name{theme_parksAndRec_light}
4 | \alias{theme_parksAndRec_light}
5 | \title{Parks & Recreation "Light" theme (deprecated)}
6 | \usage{
7 | theme_parksAndRec_light(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 20,
12 | text.size = 16,
13 | subtitle.size = 14,
14 | axis.title.size = 14,
15 | axis.text.size = 12,
16 | legend.title.size = 14,
17 | legend.text.size = 12,
18 | title.color = "grey20",
19 | subtitle.color = "grey20",
20 | text.color = "grey20",
21 | axis.title.color = "grey20",
22 | axis.text.color = "grey20",
23 | legend.title.color = "grey20",
24 | legend.text.color = "grey20",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{title font size, Default: 20}
37 |
38 | \item{text.size}{text font size, Default: 16}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 14}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 12}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 14}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 12}
49 |
50 | \item{title.color}{title color, Default: "grey20"}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: "grey20"}
53 |
54 | \item{text.color}{text color, Default: "grey20"}
55 |
56 | \item{axis.title.color}{axis title color, Default: "grey20"}
57 |
58 | \item{axis.text.color}{axis text color, Default: "grey20"}
59 |
60 | \item{legend.title.color}{legend title color, Default: "grey20"}
61 |
62 | \item{legend.text.color}{legend text color, Default: "grey20"}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Parks & Recreation light theme, Recommended font: "Titillium Web"
70 | }
71 | \details{
72 | Actual font: 'Champion HTF-Heavyweight'
73 | This function has been deprecated in favor of `theme_parksAndRecLight` to follow
74 | the naming conventions of the package.
75 | }
76 | \seealso{
77 | [ggplot2::theme]
78 | }
79 |
--------------------------------------------------------------------------------
/man/theme_parksAndRec.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_parksAndRec.R
3 | \name{theme_parksAndRec}
4 | \alias{theme_parksAndRec}
5 | \title{Parks & Recreation theme}
6 | \usage{
7 | theme_parksAndRec(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 20,
12 | text.size = 16,
13 | subtitle.size = 14,
14 | axis.title.size = 14,
15 | axis.text.size = 12,
16 | legend.title.size = 14,
17 | legend.text.size = 12,
18 | title.color = NULL,
19 | subtitle.color = NULL,
20 | text.color = NULL,
21 | axis.title.color = "black",
22 | axis.text.color = "black",
23 | legend.title.color = NULL,
24 | legend.text.color = NULL,
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{title font size, Default: 20}
37 |
38 | \item{text.size}{text font size, Default: 16}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 14}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 12}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 14}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 12}
49 |
50 | \item{title.color}{title color, Default: NULL}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: NULL}
53 |
54 | \item{text.color}{text color, Default: NULL}
55 |
56 | \item{axis.title.color}{axis title color, Default: NULL}
57 |
58 | \item{axis.text.color}{axis text color, Default: NULL}
59 |
60 | \item{legend.title.color}{legend title color, Default: NULL}
61 |
62 | \item{legend.text.color}{legend text color, Default: NULL}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Parks & Recreation theme, Recommended font: "Titillium Web"
70 | }
71 | \details{
72 | Actual font: 'Champion HTF-Heavyweight'
73 | }
74 | \examples{
75 | library(ggplot2)
76 |
77 | ggplot(airquality, aes(x = Day, y = Temp,
78 | group = as.factor(Month), color = as.factor(Month))) +
79 | geom_point(size = 2.5) +
80 | scale_color_parksAndRec() +
81 | theme_parksAndRec()
82 | }
83 | \seealso{
84 | [ggplot2::theme]
85 | }
86 |
--------------------------------------------------------------------------------
/man/theme_rickAndMorty.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_rickandmorty.R
3 | \name{theme_rickAndMorty}
4 | \alias{theme_rickAndMorty}
5 | \title{Rick & Morty theme}
6 | \usage{
7 | theme_rickAndMorty(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 20,
12 | text.size = 12,
13 | subtitle.size = 14,
14 | axis.title.size = 14,
15 | axis.text.size = 10,
16 | legend.title.size = 10,
17 | legend.text.size = 9,
18 | title.color = NULL,
19 | subtitle.color = NULL,
20 | text.color = NULL,
21 | axis.title.color = NULL,
22 | axis.text.color = "black",
23 | legend.title.color = NULL,
24 | legend.text.color = NULL,
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{title size, Default: 20}
37 |
38 | \item{text.size}{text font size, Default: 12}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 14}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 10}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 9}
49 |
50 | \item{title.color}{title color, Default: NULL}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: NULL}
53 |
54 | \item{text.color}{text color, Default: NULL}
55 |
56 | \item{axis.title.color}{axis title color, Default: NULL}
57 |
58 | \item{axis.text.color}{axis text color, Default: "black"}
59 |
60 | \item{legend.title.color}{legend title color, Default: NULL}
61 |
62 | \item{legend.text.color}{legend text color, Default: NULL}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Rick & Morty theme, Recommended font: "Get Schwifty"
70 | }
71 | \details{
72 | Actual font is based on Justin Roiland's handwriting!
73 | }
74 | \examples{
75 | library(ggplot2)
76 |
77 | ggplot(airquality, aes(x = Day, y = Temp,
78 | group = as.factor(Month), color = as.factor(Month))) +
79 | geom_point(size = 2.5) +
80 | scale_color_rickAndMorty() +
81 | theme_rickAndMorty()
82 | }
83 | \seealso{
84 | [ggplot2::theme]
85 | }
86 |
--------------------------------------------------------------------------------
/_pkgdown.yml:
--------------------------------------------------------------------------------
1 | url: https://ryo-n7.github.io/tvthemes/
2 |
3 | template:
4 | params:
5 | bootswatch: cosmo
6 |
7 | authors:
8 | Ryo Nakagawara:
9 | href: https://ryo-n7.github.io
10 |
11 | navbar:
12 | title: tvthemes
13 | type: inverse
14 | left:
15 | - text: Home
16 | href: index.html
17 | - text: Reference
18 | href: reference/index.html
19 | - text: Articles
20 | menu:
21 | - text: tvthemes 1.0.0
22 | href: articles/tvthemes-1_0_0.html
23 | - text: Fonts & Colors
24 | href: articles/fonts-and-colors.html
25 | - text: Examples (with Code)
26 | href: articles/examples.html
27 | - text: News
28 | href: news/index.html
29 |
30 | reference:
31 | - title: Attack On Titan palette
32 | contents:
33 | - matches("attackOnTitan")
34 | - title: Avatar - The Last Airbender palettes and theme
35 | desc: avatarTLA() replaced by avatar()
36 | contents:
37 | - matches("avatar")
38 | - title: Big Hero 6 palette
39 | contents:
40 | - matches("bigHero6")
41 | - title: Brooklyn Nine Nine palettes and theme
42 | desc: Light and Dark
43 | contents:
44 | - matches("brooklyn99")
45 | - title: Gravity Falls palette
46 | contents:
47 | - matches("gravityFalls")
48 | - title: Hilda palettes and themes
49 | desc: Day, Dusk, & Night palettes
50 | contents:
51 | - matches("hilda")
52 | - title: Import Fonts
53 | desc: Using {extrafont} package
54 | contents:
55 | - starts_with("import")
56 | - title: Kim Possible palettes
57 | contents:
58 | - matches("kimPossible")
59 | - title: Add Spongebob Background
60 | desc: Using {magick} package
61 | contents:
62 | - matches("BikiniBottom")
63 | - title: Parks & Recreation palettes and themes
64 | desc: Light and Dark
65 | contents:
66 | - matches("parksAndRec")
67 | - title: Rick & Morty palette and theme
68 | contents:
69 | - matches("rickAndMorty")
70 | - title: The Simpsons palette and theme
71 | contents:
72 | - matches("simpsons")
73 | - title: Spongebob Squarepants palette and theme
74 | contents:
75 | - matches("spongeBob")
76 | - title: Steven Universe palette
77 | contents:
78 | - matches("stevenUniverse")
79 | - title: Great Houses of Westeros palettes
80 | contents:
81 | - matches("westeros")
82 | - title: internal
83 | contents:
84 | - theme_theLastAirbender
85 |
--------------------------------------------------------------------------------
/man/theme_simpsons.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_simpsons.R
3 | \name{theme_simpsons}
4 | \alias{theme_simpsons}
5 | \title{The Simpsons theme}
6 | \usage{
7 | theme_simpsons(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 18,
12 | text.size = 14,
13 | subtitle.size = 12,
14 | axis.title.size = 14,
15 | axis.text.size = 10,
16 | legend.title.size = 10,
17 | legend.text.size = 9,
18 | title.color = "#FFD235",
19 | subtitle.color = "#fee8c8",
20 | text.color = "#fee8c8",
21 | axis.title.color = "#fee8c8",
22 | axis.text.color = "#fee8c8",
23 | legend.title.color = "#ffffff",
24 | legend.text.color = "#ffffff",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{title font size, Default: 18}
37 |
38 | \item{text.size}{text font size, Default: 14}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 12}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 10}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 9}
49 |
50 | \item{title.color}{title color, Default: "#FFD235"}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: "#fee8c8"}
53 |
54 | \item{text.color}{text color, Default: "#fee8c8"}
55 |
56 | \item{axis.title.color}{axis title color, Default: "#fee8c8"}
57 |
58 | \item{axis.text.color}{axis text color, Default: "#fee8c8"}
59 |
60 | \item{legend.title.color}{legend title color, Default: "#ffffff"}
61 |
62 | \item{legend.text.color}{legend text color, Default: "#ffffff"}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | The Simpsons theme, Recommended font: "Akbar"
70 | }
71 | \details{
72 | In part inspired by `@nathancunn`'s blog posts on The Simpsons!
73 | }
74 | \examples{
75 | library(ggplot2)
76 |
77 | ggplot(airquality, aes(x = Day, y = Temp,
78 | group = as.factor(Month), color = as.factor(Month))) +
79 | geom_point(size = 2.5) +
80 | scale_color_simpsons() +
81 | theme_simpsons()
82 | }
83 | \seealso{
84 | [ggplot2::theme]
85 | }
86 |
--------------------------------------------------------------------------------
/man/theme_hildaDay.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_hilda.R
3 | \name{theme_hildaDay}
4 | \alias{theme_hildaDay}
5 | \title{Hilda "Day" theme}
6 | \usage{
7 | theme_hildaDay(
8 | text.font = "Chelsea Market",
9 | title.font = "Chelsea Market",
10 | legend.font = "Chelsea Market",
11 | title.size = 18,
12 | text.size = 14,
13 | subtitle.size = 12,
14 | axis.title.size = 14,
15 | axis.text.size = 12,
16 | legend.title.size = 10,
17 | legend.text.size = 9,
18 | title.color = "#659794",
19 | subtitle.color = "#659794",
20 | text.color = "#659794",
21 | axis.title.color = "#659794",
22 | axis.text.color = "#93a1a1",
23 | legend.title.color = "#659794",
24 | legend.text.color = "#93a1a1",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: "Chelsea Market"}
31 |
32 | \item{title.font}{title font, Default: "Chelsea Market"}
33 |
34 | \item{legend.font}{legend font, Default: "Chelsea Market"}
35 |
36 | \item{title.size}{title font size, Default: 18}
37 |
38 | \item{text.size}{text font size, Default: 14}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 12}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 12}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 9}
49 |
50 | \item{title.color}{title color, Default: '#F9FEFF'}
51 |
52 | \item{subtitle.color}{subtitle color, Default: '#F9FEFF'}
53 |
54 | \item{text.color}{text color, Default: '#F9FEFF'}
55 |
56 | \item{axis.title.color}{axis title color, Default: '#F9FEFF'}
57 |
58 | \item{axis.text.color}{axis text color, Default: '#F9FEFF'}
59 |
60 | \item{legend.title.color}{legend title color, Default: '#F9FEFF'}
61 |
62 | \item{legend.text.color}{legend text color, Default: '#F9FEFF'}
63 |
64 | \item{legend.position}{legend position, Default: 'bottom'}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Hilda Day theme
70 | }
71 | \examples{
72 | library(ggplot2)
73 |
74 | ggplot(airquality, aes(x = Day, y = Temp,
75 | group = as.factor(Month), color = as.factor(Month))) +
76 | geom_point(size = 2.5) +
77 | scale_color_hilda(palette = "Day") +
78 | theme_hildaDay(text.font = "Times", title.font = "Times",
79 | legend.font = "Times")
80 | }
81 |
--------------------------------------------------------------------------------
/man/theme_hildaDusk.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_hilda.R
3 | \name{theme_hildaDusk}
4 | \alias{theme_hildaDusk}
5 | \title{Hilda "Dusk" theme}
6 | \usage{
7 | theme_hildaDusk(
8 | text.font = "Chelsea Market",
9 | title.font = "Chelsea Market",
10 | legend.font = "Chelsea Market",
11 | title.size = 18,
12 | text.size = 14,
13 | subtitle.size = 12,
14 | axis.title.size = 14,
15 | axis.text.size = 12,
16 | legend.title.size = 10,
17 | legend.text.size = 9,
18 | title.color = "#F9FEFF",
19 | subtitle.color = "#F9FEFF",
20 | text.color = "#F9FEFF",
21 | axis.title.color = "#F9FEFF",
22 | axis.text.color = "#F9FEFF",
23 | legend.title.color = "#F9FEFF",
24 | legend.text.color = "#F9FEFF",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: "Chelsea Market"}
31 |
32 | \item{title.font}{title font, Default: "Chelsea Market"}
33 |
34 | \item{legend.font}{legend font, Default: "Chelsea Market"}
35 |
36 | \item{title.size}{title font size, Default: 18}
37 |
38 | \item{text.size}{text font size, Default: 14}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 12}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 12}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 9}
49 |
50 | \item{title.color}{title color, Default: '#F9FEFF'}
51 |
52 | \item{subtitle.color}{subtitle color, Default: '#F9FEFF'}
53 |
54 | \item{text.color}{text color, Default: '#F9FEFF'}
55 |
56 | \item{axis.title.color}{axis title color, Default: '#F9FEFF'}
57 |
58 | \item{axis.text.color}{axis text color, Default: '#F9FEFF'}
59 |
60 | \item{legend.title.color}{legend title color, Default: '#F9FEFF'}
61 |
62 | \item{legend.text.color}{legend text color, Default: '#F9FEFF'}
63 |
64 | \item{legend.position}{legend position, Default: 'bottom'}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Hilda theme
70 | }
71 | \examples{
72 | library(ggplot2)
73 |
74 | ggplot(airquality, aes(x = Day, y = Temp,
75 | group = as.factor(Month), color = as.factor(Month))) +
76 | geom_point(size = 2.5) +
77 | scale_color_hilda(palette = "Dusk") +
78 | theme_hildaDusk(text.font = "Times", title.font = "Times",
79 | legend.font = "Times")
80 | }
81 |
--------------------------------------------------------------------------------
/man/theme_hildaNight.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_hilda.R
3 | \name{theme_hildaNight}
4 | \alias{theme_hildaNight}
5 | \title{Hilda "Night" theme}
6 | \usage{
7 | theme_hildaNight(
8 | text.font = "Chelsea Market",
9 | title.font = "Chelsea Market",
10 | legend.font = "Chelsea Market",
11 | title.size = 18,
12 | text.size = 14,
13 | subtitle.size = 12,
14 | axis.title.size = 14,
15 | axis.text.size = 12,
16 | legend.title.size = 10,
17 | legend.text.size = 9,
18 | title.color = "#F9FEFF",
19 | subtitle.color = "#F9FEFF",
20 | text.color = "#F9FEFF",
21 | axis.title.color = "#F9FEFF",
22 | axis.text.color = "#F9FEFF",
23 | legend.title.color = "#F9FEFF",
24 | legend.text.color = "#F9FEFF",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: "Chelsea Market"}
31 |
32 | \item{title.font}{title font, Default: "Chelsea Market"}
33 |
34 | \item{legend.font}{legend font, Default: "Chelsea Market"}
35 |
36 | \item{title.size}{title font size, Default: 18}
37 |
38 | \item{text.size}{text font size, Default: 14}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 12}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 12}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 9}
49 |
50 | \item{title.color}{title color, Default: '#F9FEFF'}
51 |
52 | \item{subtitle.color}{subtitle color, Default: '#F9FEFF'}
53 |
54 | \item{text.color}{text color, Default: '#F9FEFF'}
55 |
56 | \item{axis.title.color}{axis title color, Default: '#F9FEFF'}
57 |
58 | \item{axis.text.color}{axis text color, Default: '#F9FEFF'}
59 |
60 | \item{legend.title.color}{legend title color, Default: '#F9FEFF'}
61 |
62 | \item{legend.text.color}{legend text color, Default: '#F9FEFF'}
63 |
64 | \item{legend.position}{legend position, Default: 'bottom'}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Hilda theme
70 | }
71 | \examples{
72 | library(ggplot2)
73 |
74 | ggplot(airquality, aes(x = Day, y = Temp,
75 | group = as.factor(Month), color = as.factor(Month))) +
76 | geom_point(size = 2.5) +
77 | scale_color_hilda(palette = "Night") +
78 | theme_hildaNight(text.font = "Times", title.font = "Times",
79 | legend.font = "Times")
80 | }
81 |
--------------------------------------------------------------------------------
/man/theme_brooklyn99.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_brooklyn99.R
3 | \name{theme_brooklyn99}
4 | \alias{theme_brooklyn99}
5 | \title{Brooklyn Nine-Nine theme}
6 | \usage{
7 | theme_brooklyn99(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 18,
12 | text.size = 14,
13 | subtitle.size = 12,
14 | axis.title.size = 14,
15 | axis.text.size = 12,
16 | legend.title.size = 10,
17 | legend.text.size = 9,
18 | title.color = "#F9FEFF",
19 | subtitle.color = "#F9FEFF",
20 | text.color = "#F9FEFF",
21 | axis.title.color = "#F9FEFF",
22 | axis.text.color = "#F9FEFF",
23 | legend.title.color = "#F9FEFF",
24 | legend.text.color = "#F9FEFF",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{title font size, Default: 18}
37 |
38 | \item{text.size}{text font size, Default: 14}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 12}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 12}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 9}
49 |
50 | \item{title.color}{title color, Default: "F9FEFF"}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: "F9FEFF"}
53 |
54 | \item{text.color}{text color, Default: "F9FEFF"}
55 |
56 | \item{axis.title.color}{axis title color, Default: "F9FEFF"}
57 |
58 | \item{axis.text.color}{axis text color, Default: "F9FEFF"}
59 |
60 | \item{legend.title.color}{legend title color, Default: "F9FEFF"}
61 |
62 | \item{legend.text.color}{legend text color, Default: "F9FEFF"}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Brooklyn Nine-Nine theme, Recommended font: "Roboto Condensed" (title), "Calibri Light" (other text)
70 | }
71 | \details{
72 | Actual font: Variants of 'Univers'
73 | }
74 | \examples{
75 | library(ggplot2)
76 |
77 | ggplot(airquality, aes(x = Day, y = Temp,
78 | group = as.factor(Month), color = as.factor(Month))) +
79 | geom_point(size = 2.5) +
80 | scale_color_brooklyn99() +
81 | theme_brooklyn99()
82 | }
83 | \seealso{
84 | [ggplot2::theme]
85 | }
86 |
--------------------------------------------------------------------------------
/man/theme_parksAndRecLight.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_parksAndRec.R
3 | \name{theme_parksAndRecLight}
4 | \alias{theme_parksAndRecLight}
5 | \title{Parks & Recreation "Light" theme}
6 | \usage{
7 | theme_parksAndRecLight(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 20,
12 | text.size = 16,
13 | subtitle.size = 14,
14 | axis.title.size = 14,
15 | axis.text.size = 12,
16 | legend.title.size = 14,
17 | legend.text.size = 12,
18 | title.color = "grey20",
19 | subtitle.color = "grey20",
20 | text.color = "grey20",
21 | axis.title.color = "grey20",
22 | axis.text.color = "grey20",
23 | legend.title.color = "grey20",
24 | legend.text.color = "grey20",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{title font size, Default: 20}
37 |
38 | \item{text.size}{text font size, Default: 16}
39 |
40 | \item{subtitle.size}{subtitle font size, Default: 14}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 12}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 14}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 12}
49 |
50 | \item{title.color}{title color, Default: "grey20"}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: "grey20"}
53 |
54 | \item{text.color}{text color, Default: "grey20"}
55 |
56 | \item{axis.title.color}{axis title color, Default: "grey20"}
57 |
58 | \item{axis.text.color}{axis text color, Default: "grey20"}
59 |
60 | \item{legend.title.color}{legend title color, Default: "grey20"}
61 |
62 | \item{legend.text.color}{legend text color, Default: "grey20"}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Parks & Recreation light theme, Recommended font: "Titillium Web"
70 | }
71 | \details{
72 | Actual font: 'Champion HTF-Heavyweight'
73 | }
74 | \examples{
75 | library(ggplot2)
76 |
77 | ggplot(airquality, aes(x = Day, y = Temp,
78 | group = as.factor(Month), color = as.factor(Month))) +
79 | geom_point(size = 2.5) +
80 | scale_color_parksAndRec() +
81 | theme_parksAndRecLight()
82 | }
83 | \seealso{
84 | [ggplot2::theme]
85 | }
86 |
--------------------------------------------------------------------------------
/man/theme_spongeBob.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/theme_spongebob.R
3 | \name{theme_spongeBob}
4 | \alias{theme_spongeBob}
5 | \title{Spongebob Squarepants theme}
6 | \usage{
7 | theme_spongeBob(
8 | text.font = NULL,
9 | title.font = NULL,
10 | legend.font = NULL,
11 | title.size = 18,
12 | text.size = 12,
13 | subtitle.size = 12,
14 | axis.title.size = 14,
15 | axis.text.size = 12,
16 | legend.title.size = 10,
17 | legend.text.size = 9,
18 | title.color = "#F9FEFF",
19 | subtitle.color = "#F9FEFF",
20 | text.color = "#F9FEFF",
21 | axis.title.color = "#F9FEFF",
22 | axis.text.color = "#F9FEFF",
23 | legend.title.color = "#F9FEFF",
24 | legend.text.color = "#F9FEFF",
25 | legend.position = "bottom",
26 | ticks = FALSE
27 | )
28 | }
29 | \arguments{
30 | \item{text.font}{text font, Default: NULL}
31 |
32 | \item{title.font}{title font, Default: NULL}
33 |
34 | \item{legend.font}{legend font, Default: NULL}
35 |
36 | \item{title.size}{size of title, Default: 18}
37 |
38 | \item{text.size}{text font size, Default: 12}
39 |
40 | \item{subtitle.size}{subtitle font size, Default:12}
41 |
42 | \item{axis.title.size}{axis title font size, Default: 14}
43 |
44 | \item{axis.text.size}{axis text font size, Default: 12}
45 |
46 | \item{legend.title.size}{legend title font size, Default: 10}
47 |
48 | \item{legend.text.size}{legend text font size, Default: 9}
49 |
50 | \item{title.color}{title color, Default: "F9FEFF"}
51 |
52 | \item{subtitle.color}{subtitle.color, Default: "F9FEFF"}
53 |
54 | \item{text.color}{text color, Default: "F9FEFF"}
55 |
56 | \item{axis.title.color}{axis title color, Default: "F9FEFF"}
57 |
58 | \item{axis.text.color}{axis text color, Default: "F9FEFF"}
59 |
60 | \item{legend.title.color}{legend title color, Default: "F9FEFF"}
61 |
62 | \item{legend.text.color}{legend text color, Default: "F9FEFF"}
63 |
64 | \item{legend.position}{legend position, Default: "bottom"}
65 |
66 | \item{ticks}{add axis ticks, Default: FALSE}
67 | }
68 | \description{
69 | Spongebob Squarepants theme, Recommended font: "Some Time Later"
70 | }
71 | \details{
72 | Spongbobify your plots even more by combining with `paintBikiniBottom()`!
73 | }
74 | \examples{
75 | library(ggplot2)
76 |
77 | ggplot(airquality, aes(x = Day, y = Temp,
78 | group = as.factor(Month), color = as.factor(Month))) +
79 | geom_point(size = 2.5) +
80 | scale_color_spongeBob() +
81 | theme_spongeBob()
82 | }
83 | \seealso{
84 | [tvthemes::paintBikiniBottom]
85 | }
86 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Code of Conduct
2 |
3 | For the `theme_*()` follow the order of the arguments:
4 |
5 | * text.font = __,
6 | * title.font = __,
7 | * legend.font = __,
8 | * title.size = __,
9 | * text.size = __,
10 | * subtitle.size = __,
11 | * axis.title.size = __,
12 | * axis.text.size = __,
13 | * legend.title.size = __,
14 | * legend.text.size = __,
15 | * title.color = __,
16 | * subtitle.color = __,
17 | * text.color = __,
18 | * axis.title.color = __,
19 | * axis.text.color = __,
20 | * legend.title.color = __,
21 | * legend.text.color = __,
22 | * legend.position = __,
23 | * ticks = __
24 |
25 | For the ordering of the actual `theme()` elements:
26 | * text (text, plot.title, plot.subtitle)
27 | * axis
28 | * background/panel
29 | * legend
30 | * axis ticks toggle
31 |
32 | The best way to go about it is to just copy-paste an existing theme in the package and start editing from there.
33 |
34 | For the `palettes`:
35 | * palette, if multiple then in a list
36 | * pal object
37 | * scale_color and colour
38 | * scale_fill
39 |
40 | As with the `themes` it's best to just copy-paste an existing palette in the package and start editing from there.
41 |
42 | As contributors and maintainers of this project, we pledge to respect all people who
43 | contribute through reporting issues, posting feature requests, updating documentation,
44 | submitting pull requests or patches, and other activities.
45 |
46 | We are committed to making participation in this project a harassment-free experience for
47 | everyone, regardless of level of experience, gender, gender identity and expression,
48 | sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
49 |
50 | Examples of unacceptable behavior by participants include the use of sexual language or
51 | imagery, derogatory comments or personal attacks, trolling, public or private harassment,
52 | insults, or other unprofessional conduct.
53 |
54 | Project maintainers have the right and responsibility to remove, edit, or reject comments,
55 | commits, code, wiki edits, issues, and other contributions that are not aligned to this
56 | Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
57 | from the project team.
58 |
59 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
60 | opening an issue or contacting one or more of the project maintainers at ryonakagawara@gmail.com.
61 |
62 | This Code of Conduct is adapted from the Contributor Covenant
63 | (http://contributor-covenant.org), version 1.0.0, available at
64 | http://contributor-covenant.org/version/1/0/0/
65 |
--------------------------------------------------------------------------------
/.github/workflows/R-CMD-check.yaml:
--------------------------------------------------------------------------------
1 | # For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2 | # https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
3 | on:
4 | push:
5 | branches:
6 | - master
7 | pull_request:
8 | branches:
9 | - master
10 |
11 | name: R-CMD-check
12 |
13 | jobs:
14 | R-CMD-check:
15 | runs-on: ${{ matrix.config.os }}
16 |
17 | name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18 |
19 | strategy:
20 | fail-fast: false
21 | matrix:
22 | config:
23 | - {os: windows-latest, r: 'release'}
24 | - {os: macOS-latest, r: 'release'}
25 | - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26 | - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
27 |
28 | env:
29 | R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
30 | RSPM: ${{ matrix.config.rspm }}
31 |
32 | steps:
33 | - uses: actions/checkout@v2
34 |
35 | - uses: r-lib/actions/setup-r@master
36 | with:
37 | r-version: ${{ matrix.config.r }}
38 |
39 | - uses: r-lib/actions/setup-pandoc@master
40 |
41 | - name: Query dependencies
42 | run: |
43 | install.packages('remotes')
44 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
45 | writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
46 | shell: Rscript {0}
47 |
48 | - name: Cache R packages
49 | if: runner.os != 'Windows'
50 | uses: actions/cache@v1
51 | with:
52 | path: ${{ env.R_LIBS_USER }}
53 | key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
54 | restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
55 |
56 | - name: Install system dependencies
57 | if: runner.os == 'Linux'
58 | run: |
59 | while read -r cmd
60 | do
61 | eval sudo $cmd
62 | done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
63 |
64 | - name: Install dependencies
65 | run: |
66 | remotes::install_deps(dependencies = TRUE)
67 | remotes::install_cran("rcmdcheck")
68 | shell: Rscript {0}
69 |
70 | - name: Check
71 | env:
72 | _R_CHECK_CRAN_INCOMING_REMOTE_: false
73 | run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
74 | shell: Rscript {0}
75 |
76 | - name: Upload check results
77 | if: failure()
78 | uses: actions/upload-artifact@main
79 | with:
80 | name: ${{ runner.os }}-r${{ matrix.config.r }}-results
81 | path: check
82 |
--------------------------------------------------------------------------------
/NAMESPACE:
--------------------------------------------------------------------------------
1 | # Generated by roxygen2: do not edit by hand
2 |
3 | export(attackOnTitan_pal)
4 | export(avatarTLA_pal)
5 | export(avatar_pal)
6 | export(bigHero6_pal)
7 | export(brooklyn99_pal)
8 | export(gravityFalls_pal)
9 | export(hilda_pal)
10 | export(import_avatar)
11 | export(import_gravitationFalls)
12 | export(import_rickAndMorty)
13 | export(import_simpsons)
14 | export(import_spongeBob)
15 | export(import_theLastAirbender)
16 | export(kimPossible_pal)
17 | export(paintBikiniBottom)
18 | export(parksAndRec_pal)
19 | export(rickAndMorty_pal)
20 | export(scale_color_attackOnTitan)
21 | export(scale_color_avatar)
22 | export(scale_color_avatarTLA)
23 | export(scale_color_bigHero6)
24 | export(scale_color_brooklyn99)
25 | export(scale_color_gravityFalls)
26 | export(scale_color_hilda)
27 | export(scale_color_kimPossible)
28 | export(scale_color_parksAndRec)
29 | export(scale_color_rickAndMorty)
30 | export(scale_color_simpsons)
31 | export(scale_color_spongeBob)
32 | export(scale_color_stevenUniverse)
33 | export(scale_color_westeros)
34 | export(scale_colour_attackOnTitan)
35 | export(scale_colour_avatar)
36 | export(scale_colour_avatarTLA)
37 | export(scale_colour_bigHero6)
38 | export(scale_colour_brooklyn99)
39 | export(scale_colour_gravityFalls)
40 | export(scale_colour_hilda)
41 | export(scale_colour_kimPossible)
42 | export(scale_colour_parksAndRec)
43 | export(scale_colour_rickAndMorty)
44 | export(scale_colour_simpsons)
45 | export(scale_colour_spongeBob)
46 | export(scale_colour_stevenUniverse)
47 | export(scale_colour_westeros)
48 | export(scale_fill_attackOnTitan)
49 | export(scale_fill_avatar)
50 | export(scale_fill_avatarTLA)
51 | export(scale_fill_bigHero6)
52 | export(scale_fill_brooklyn99)
53 | export(scale_fill_gravityFalls)
54 | export(scale_fill_hilda)
55 | export(scale_fill_kimPossible)
56 | export(scale_fill_parksAndRec)
57 | export(scale_fill_rickAndMorty)
58 | export(scale_fill_simpsons)
59 | export(scale_fill_spongeBob)
60 | export(scale_fill_stevenUniverse)
61 | export(scale_fill_westeros)
62 | export(simpsons_pal)
63 | export(spongeBob_pal)
64 | export(stevenUniverse_pal)
65 | export(theme_avatar)
66 | export(theme_brooklyn99)
67 | export(theme_hildaDay)
68 | export(theme_hildaDusk)
69 | export(theme_hildaNight)
70 | export(theme_parksAndRec)
71 | export(theme_parksAndRecLight)
72 | export(theme_parksAndRec_light)
73 | export(theme_rickAndMorty)
74 | export(theme_simpsons)
75 | export(theme_spongeBob)
76 | export(theme_theLastAirbender)
77 | export(westeros_pal)
78 | importFrom(extrafont,font_import)
79 | importFrom(ggplot2,discrete_scale)
80 | importFrom(ggplot2,element_blank)
81 | importFrom(ggplot2,element_line)
82 | importFrom(ggplot2,element_rect)
83 | importFrom(ggplot2,element_text)
84 | importFrom(ggplot2,scale_color_gradientn)
85 | importFrom(ggplot2,scale_fill_gradientn)
86 | importFrom(ggplot2,theme)
87 | importFrom(ggplot2,theme_minimal)
88 | importFrom(grDevices,colorRampPalette)
89 | importFrom(grid,unit)
90 | importFrom(magick,image_composite)
91 | importFrom(magick,image_crop)
92 | importFrom(magick,image_graph)
93 | importFrom(magick,image_read)
94 | importFrom(magick,image_resize)
95 | importFrom(magick,image_write)
96 | importFrom(scales,manual_pal)
97 |
--------------------------------------------------------------------------------
/vignettes/tvthemes-1_0_0.Rmd:
--------------------------------------------------------------------------------
1 | ---
2 | title: "{tvthemes} 1.0.0"
3 | output: rmarkdown::html_vignette
4 | vignette: >
5 | %\VignetteIndexEntry{{tvthemes} 1.0.0}
6 | %\VignetteEngine{knitr::rmarkdown}
7 | %\VignetteEncoding{UTF-8}
8 | ---
9 |
10 | ```{r, include = FALSE}
11 | knitr::opts_chunk$set(
12 | collapse = TRUE,
13 | comment = "#>"
14 | )
15 | ```
16 |
17 | ```{r setup}
18 | library(tvthemes)
19 | library(ggplot2)
20 | ```
21 |
22 | # tvthemes 1.0.0 Major Changes
23 |
24 | | TV Show | New Palette(s) | New Theme(s) |
25 | | ------------- |---------------| ------- |
26 | | [Game of Thrones](https://en.wikipedia.org/wiki/Game_of_Thrones) | Stannis Baratheon, House Martell, House Arryn, House Manderly | NA |
27 | | [Kim Possible](https://en.wikipedia.org/wiki/Kim_Possible) | 1 | NA |
28 | | [Big Hero 6](https://en.wikipedia.org/wiki/Big_Hero_6:_The_Series) | 1 | NA |
29 | | [Hilda](https://en.wikipedia.org/wiki/Hilda_(TV_series)) | Day, Dusk, Night | Day, Dusk, Night |
30 | | [Attack on Titan](https://en.wikipedia.org/wiki/Attack_on_Titan) | 1 | NA |
31 |
32 | In addition to the new palettes and themes some of the code in `tvthemes` has changed significantly.
33 |
34 | In palettes for example, when you are calling the palette functions via `scale_fill_*()` or `scale_color_*()` you now have a lot more options:
35 |
36 | * `palette`: If multiple available, select the palette: "Stannis", "FireNation", "Dusk", etc. Leave blank if only single palette available.
37 | * `n`: Number of colors. If left blank it defaults to the total number of colors available in the palette.
38 | * `type`: "Discrete" or "Continuous". NOTE: Most palettes are only optimized for "Discrete" at the present time.
39 | * `reverse`: Reverse order of colors. `TRUE`/`FALSE`
40 |
41 | For TV shows with multiple palettes they are now organized under a single "palette list" from which you pass the specific palette that you want. If you want to check out the colors for these specific palettes:
42 |
43 | ```{r, eval=FALSE}
44 | ## Previously:
45 | scales::show_col(tvthemes:::lannister_palette)
46 | scales::show_col(tvthemes:::brooklyn99_dark_palette)
47 |
48 | ## Now:
49 | scales::show_col(tvthemes:::westeros_palette$Lannister)
50 | scales::show_col(tvthemes:::brooklyn99_palette$Dark)
51 | ```
52 |
53 | The specific palettes that changed are:
54 |
55 | * `Brooklyn Nine-Nine`: Default = "Regular", "Dark"
56 | * `Avatar: The Last Airbender`: Default = "FireNation", "EarthKingdom", "WaterTribe", "AirNation"
57 | * `Hilda`: Default = "Day", "Dusk", "Night"
58 | * `Game of Thrones/A Song of Ice & Fire`: Default = "Stark", "Stannis", "Tyrell", "Lannister", "Manderly", "Martell", "Arryn", "Greyjoy", "Targaryen", "Tully"
59 |
60 | ```{r eval=FALSE}
61 | ## Plot not shown
62 | ggplot(mpg, aes(displ)) +
63 | geom_histogram(aes(fill = class), col = "black", size = 0.1) +
64 | scale_fill_westeros(palette = "Stannis", n = 7, reverse = TRUE)
65 | ```
66 |
67 | For themes the one change is a toggle option for axis ticks via `ticks` which you can set to either `TRUE` and the default `FALSE`.
68 |
69 | ```{r eval=FALSE}
70 | ## Plot not shown
71 | ggplot(mpg, aes(displ)) +
72 | geom_histogram(aes(fill = class), col = "black", size = 0.1) +
73 | scale_fill_kimPossible(n = 5, reverse = FALSE) +
74 | theme_hildaDay(ticks = TRUE)
75 | ```
76 |
--------------------------------------------------------------------------------
/NEWS.md:
--------------------------------------------------------------------------------
1 | # tvthemes 1.3.3
2 |
3 | * Add @docType package
4 | * See [issue #22](https://github.com/Ryo-N7/tvthemes/issues/22)
5 | * Fix or delete discrete scale tests as per ggplot2 3.5.0 changes
6 |
7 | # tvthemes 1.3.2
8 |
9 | * Change 'size' argument for `element_line()` and `element_rect()` to 'linewidth' in line with new 3.4.0 version of {ggplot2}
10 | * See [issue #20](https://github.com/Ryo-N7/tvthemes/issues/20)
11 |
12 | # tvthemes 1.3.1
13 |
14 | * Removed Google Fonts files from package as they took up a lot of space and people can easily download them themselves
15 | * Removed Google Fonts related functions and tests, edited Fonts vignette
16 | * Fixed Palette Hilda test that failed on CRAN due to no default
17 | * Removed extraneous dependencies (spelling, gapminder)
18 |
19 | # tvthemes 1.3.0
20 |
21 | * New palette:
22 | * Steven Universe (31 variants based on different Gem characters)
23 | * Remove {glue} package as a dependency
24 | * Imgur links for plot examples are replaced with direct links to printed images in man/ folder
25 |
26 | # tvthemes 1.2.0
27 |
28 | * Add Github Actions
29 | * R-CMD-Check, codecov, build pkgdown
30 | * Add license for 'Some Time Later' font
31 | * Fix tests, re: check environment
32 |
33 | # tvthemes 1.1.0
34 |
35 | * New palette:
36 | * Gravity Falls
37 | * New font:
38 | * "Gravitation Falls"
39 | * Renamed functions to fit `*_camelCase()` style:
40 | * `import_titilliumWeb()`, `import_robotoCondensed()`, `import_chelseaMarket()`
41 | * Renamed 'Avatar: The Last Airbender' functions:
42 | * `scale_*_avatar()`, `theme_avatar()`
43 | * Deprecated functions:
44 | * `import_titillium_web()`, `import_roboto_condensed()`, `scale_*_avatarTLA()`,
45 | `theme_theLastAirbender()`
46 | * Deleted functions:
47 | * `import_ChelseaMarket()` (replaced by `import_chelseaMarket()`)
48 | * Added `{packagedown}` website
49 | * Split README into vignettes
50 | * Added more tests
51 |
52 | # tvthemes 1.0.0
53 |
54 | * Released on CRAN! (September 3rd, 2019)
55 | * New palettes:
56 | * Kim Possible, Big Hero 6, Stannis Baratheon, House Manderly, House Martell, House Arryn, Hilda, & Attack on Titan
57 | * New themes:
58 | * Hilda: Day, Dusk, & Night
59 | * Increased functionality in all palette functions
60 | * `palette`, `n`, `type`, `reverse` options added
61 | * TV shows with multiple palettes have a single function from which you call a specific palette:
62 | * `scale_color_westeros(palette = "Stannis")`
63 | * `scale_fill_avatarTLA(palette = "EarthKingdom")`
64 | * Toggle ticks with `ticks = TRUE` or `ticks = FALSE`
65 | * More tests added
66 | * Improved documentation
67 |
68 | # tvthemes 0.0.0.9100
69 |
70 | * Corrected `title` in P&R, R&M, TLA themes to `plot.title`
71 | * Fix swapped `axis.title.size` and `axis.text.size` in R&M theme
72 | * Tests added for ALL defaults in `theme_*()` to prevent above bugs
73 |
74 | # tvthemes 0.0.0.9000
75 |
76 | * Initial release of package.
77 | * __Avatar: The Last Airbender__: theme + palettes (Fire Nation, Water Tribe, Earth Kingdom, & Air Nomads)
78 | * __Brooklyn Nine-Nine__: theme + palettes (regular & dark)
79 | * __Game of Thrones/A Song of Ice & Fire__: 'The Palettes of Ice & Fire' (currently: Stark, Lannister, Tully, Targaryen, Greyjoy, & Tyrell)
80 | * __Rick & Morty__: theme + palette
81 | * __Parks & Recreation__: two themes (light & dark) + palette
82 | * __The Simpsons__: theme + palette
83 | * __Spongebob Squarepants__: theme + palette + background images
84 |
--------------------------------------------------------------------------------
/vignettes/fonts-and-colors.Rmd:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Fonts & Colors"
3 | output: rmarkdown::html_vignette
4 | vignette: >
5 | %\VignetteIndexEntry{Fonts & Colors}
6 | %\VignetteEngine{knitr::rmarkdown}
7 | %\VignetteEncoding{UTF-8}
8 | ---
9 |
10 | ```{r, include = FALSE}
11 | knitr::opts_chunk$set(
12 | collapse = TRUE,
13 | warning = FALSE,
14 | message = FALSE,
15 | comment = "#>"
16 | )
17 | ```
18 |
19 | # Fonts
20 |
21 | __NOTE__: From `v1.3.1` onward, the Google Fonts (`Roboto Condensed`, `Titillium Web`, `Chelsea Market`, and `Cinzel`) have been removed from the package as the files were taking up a lot of space and those fonts in particular can be easily downloaded via Google Fonts by users themselves. The helper functions to import these fonts have also been removed from the package.
22 |
23 | The difficulty with a lot of the fonts used by TV shows in their logos and other paraphernalia is that they are made by font foundries and therefore can be rather expensive (for a regular person like you or me) to purchase. So I endeavored to find FREE fonts to use that were somewhat similar to the real ones used by the shows from resources like `Google Fonts`. In the documentation you can find the __actual__ fonts used by the TV shows if you are so inclined to buy them (some are just my best guesses though)! In some cases there were fan-made fonts such as "Some Time Later" for Spongebob or "Akbar" for The Simpsons that I included with the package.
24 |
25 | Instead of dealing with `extrafont` yourself, I re-purposed the `import_*()` functions from the `hrbrthemes` package so you can import the included fonts very easily. Do note that you still might need to install the fonts directly on your computer from the `.ttf` files found in `inst/fonts`. When you're done running the functions and installing the `.ttf` files on your computer, load the `extrafont` library and then run `loadfonts()`. If you're having problems check out the documentation on `extrafont`'s [Github repo](https://github.com/wch/extrafont/) or on [CRAN](https://CRAN.R-project.org/package=extrafont/).
26 |
27 | The help files for each function tells you the recommended font names in case you forget! Besides the really custom stuff like for "The Simpsons", "Rick & Morty", and "SpongeBob", font preferences are really up to you.
28 |
29 | ```{r, eval=FALSE}
30 | library(tvthemes)
31 |
32 | import_simpsons() ## "Akbar" font
33 | import_avatar() ## "Slayer" font (formerly `theme_theLastAirbender()`)
34 | import_rickAndMorty() ## "Get Schwifty" font
35 | import_spongeBob() ## "Some Time Later" font
36 | import_gravitationFalls() ## "Gravitation Falls" font for "Gravity Falls"
37 |
38 | ## install.packages("extrafont")
39 | library(extrafont)
40 | loadfonts() ## You need to do this at the beginning of a session.
41 | ```
42 |
43 | # Colors
44 |
45 | I gathered the colors/hex codes by looking at images online or re-watching some old episodes and then using various hex code websites and hex code extraction websites. The colors in some of these palettes may still change from feedback and further experimentation.
46 |
47 | You can check out all the colors for each palette by running `scales::show_col(tvthemes:::name_of_palette)`. Some examples below:
48 |
49 | ```{r}
50 | scales::show_col(tvthemes:::brooklyn99_palette$Dark)
51 | scales::show_col(tvthemes:::gravityFalls_palette)
52 | scales::show_col(tvthemes:::simpsons_palette)
53 | scales::show_col(tvthemes:::stevenUniverse_palette$Peridot)
54 | ```
55 |
--------------------------------------------------------------------------------
/tests/testthat/test-spongebob.R:
--------------------------------------------------------------------------------
1 | context("test-spongebob")
2 |
3 | expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE)
4 | expect_equal_scales <- function(x, y, ...) {
5 | x <- as.list(x)
6 | y <- as.list(y)
7 | x$call <- y$call <- NULL
8 | expect_equal(x, y, ...)
9 | }
10 |
11 | test_that("theme_spongeBob works", {
12 | thm <- theme_spongeBob()
13 | expect_s3_class(thm, "theme")
14 | ## font
15 | expect_equal(thm$text$family, "")
16 | expect_null(thm$plot.title$family)
17 | expect_null(thm$legend.title$family)
18 | expect_null(thm$legend.text$family)
19 | ## size
20 | expect_equal(thm$text$size, 12)
21 | expect_equal(thm$plot.title$size, 18)
22 | expect_equal(thm$plot.subtitle$size, 12)
23 | expect_equal(thm$axis.text$size, 12)
24 | expect_equal(thm$axis.title$size, 14)
25 | expect_equal(thm$legend.text$size, 9)
26 | expect_equal(thm$legend.title$size, 10)
27 | ## color
28 | expect_equal(thm$text$colour, "#F9FEFF")
29 | expect_equal(thm$plot.title$colour, "#F9FEFF")
30 | expect_equal(thm$plot.subtitle$colour, "#F9FEFF")
31 | expect_equal(thm$axis.text$colour, "#F9FEFF")
32 | expect_equal(thm$axis.title$colour, "#F9FEFF")
33 | expect_equal(thm$legend.text$colour, "#F9FEFF")
34 | expect_equal(thm$legend.title$colour, "#F9FEFF")
35 | expect_equal(thm$legend.position, "bottom")
36 |
37 | ## ticks == TRUE
38 | thm <- theme_spongeBob(ticks = TRUE)
39 | expect_s3_class(thm, "theme")
40 | ## font
41 | expect_equal(thm$text$family, "")
42 | expect_null(thm$plot.title$family)
43 | expect_null(thm$legend.title$family)
44 | expect_null(thm$legend.text$family)
45 | ## size
46 | expect_equal(thm$text$size, 12)
47 | expect_equal(thm$plot.title$size, 18)
48 | expect_equal(thm$plot.subtitle$size, 12)
49 | expect_equal(thm$axis.text$size, 12)
50 | expect_equal(thm$axis.title$size, 14)
51 | expect_equal(thm$legend.text$size, 9)
52 | expect_equal(thm$legend.title$size, 10)
53 | ## ticks
54 | expect_equal(thm$axis.ticks$linewidth, 0.15)
55 | ## color
56 | expect_equal(thm$text$colour, "#F9FEFF")
57 | expect_equal(thm$plot.title$colour, "#F9FEFF")
58 | expect_equal(thm$plot.subtitle$colour, "#F9FEFF")
59 | expect_equal(thm$axis.text$colour, "#F9FEFF")
60 | expect_equal(thm$axis.title$colour, "#F9FEFF")
61 | expect_equal(thm$legend.text$colour, "#F9FEFF")
62 | expect_equal(thm$legend.title$colour, "#F9FEFF")
63 | expect_equal(thm$legend.position, "bottom")
64 | })
65 |
66 | test_that("spongeBob_pal raises warning with large number, x > 9", {
67 | expect_warning(spongeBob_pal()(10))
68 | expect_warning(spongeBob_pal(reverse = TRUE)(10))
69 | expect_error(spongeBob_pal(n = 10))
70 | })
71 |
72 | # test_that("scale_colour_spongeBob equals scale_color_spongeBob", {
73 | # expect_equal_scales(scale_color_spongeBob(), scale_colour_spongeBob())
74 | # })
75 | #
76 | # test_that("scale_colour_spongeBob works", {
77 | # expect_is(scale_color_spongeBob(), "ScaleDiscrete")
78 | # })
79 | #
80 | # test_that("scale_fill_spongeBob works", {
81 | # expect_is(scale_fill_spongeBob(), "ScaleDiscrete")
82 | # })
83 |
84 | ## Colors are correct ----
85 | test_that("spongebob palette outputs correct colors", {
86 | expect_equal(spongeBob_pal()(9),
87 | c( "#C86925", ## brownpants
88 | "#FDF56C", ## sponge yellow
89 | "#FC9576", ## patrick pink
90 | "#5D57AF", ## patrick purple
91 | "#B2CE31", ## patrick green
92 | "#FF2027", ## mr.krabs red
93 | "#B1D6C5", ## squidward blue
94 | "#AB8323", ## squidward shirt brown
95 | "#000000" ## black
96 | ))
97 | })
98 |
--------------------------------------------------------------------------------
/tests/testthat/test-rickandmorty.R:
--------------------------------------------------------------------------------
1 | context("test-rickandmorty")
2 |
3 | expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE)
4 | expect_equal_scales <- function(x, y, ...) {
5 | x <- as.list(x)
6 | y <- as.list(y)
7 | x$call <- y$call <- NULL
8 | expect_equal(x, y, ...)
9 | }
10 |
11 | test_that("theme_rickAndMorty works", {
12 | thm <- theme_rickAndMorty()
13 | expect_s3_class(thm, "theme")
14 | ## font
15 | expect_equal(thm$text$family, "")
16 | expect_null(thm$plot.title$family)
17 | expect_null(thm$legend.title$family)
18 | expect_null(thm$legend.text$family)
19 | ## size
20 | expect_equal(thm$text$size, 12)
21 | expect_equal(thm$plot.title$size, 20)
22 | expect_equal(thm$plot.subtitle$size, 14)
23 | expect_equal(thm$axis.text$size, 10)
24 | expect_equal(thm$axis.title$size, 14)
25 | expect_equal(thm$legend.text$size, 9)
26 | expect_equal(thm$legend.title$size, 10)
27 | ## color
28 | #expect_null(thm$text$colour)
29 | expect_null(thm$plot.title$colour)
30 | expect_null(thm$plot.subtitle$colour)
31 | expect_equal(thm$axis.text$colour, "black")
32 | expect_null(thm$axis.title$colour)
33 | expect_null(thm$legend.text$colour)
34 | expect_null(thm$legend.title$colour)
35 | expect_equal(thm$legend.position, "bottom")
36 |
37 | ## ticks == TRUE
38 | thm <- theme_rickAndMorty(ticks = TRUE)
39 | expect_s3_class(thm, "theme")
40 | ## font
41 | expect_equal(thm$text$family, "")
42 | expect_null(thm$plot.title$family)
43 | expect_null(thm$legend.title$family)
44 | expect_null(thm$legend.text$family)
45 | ## size
46 | expect_equal(thm$text$size, 12)
47 | expect_equal(thm$plot.title$size, 20)
48 | expect_equal(thm$plot.subtitle$size, 14)
49 | expect_equal(thm$axis.text$size, 10)
50 | expect_equal(thm$axis.title$size, 14)
51 | expect_equal(thm$legend.text$size, 9)
52 | expect_equal(thm$legend.title$size, 10)
53 | ## ticks
54 | expect_equal(thm$axis.ticks$linewidth, 0.15)
55 | ## color
56 | #expect_null(thm$text$colour)
57 | expect_null(thm$plot.title$colour)
58 | expect_null(thm$plot.subtitle$colour)
59 | expect_equal(thm$axis.text$colour, "black")
60 | expect_null(thm$axis.title$colour)
61 | expect_null(thm$legend.text$colour)
62 | expect_null(thm$legend.title$colour)
63 | expect_equal(thm$legend.position, "bottom")
64 | })
65 |
66 | test_that("rickAndMorty_pal raises warning with large number, x > 9", {
67 | expect_warning(rickAndMorty_pal()(10))
68 | expect_warning(rickAndMorty_pal(reverse = TRUE)(10))
69 | expect_error(rickAndMorty_pal(n = 10))
70 | })
71 |
72 | # test_that("scale_colour_rickAndMorty equals scale_color_rickAndMorty", {
73 | # expect_equal_scales(scale_color_rickAndMorty(), scale_colour_rickAndMorty())
74 | # })
75 | #
76 | # test_that("scale_colour_rickAndMorty works", {
77 | # expect_is(scale_color_rickAndMorty(), "ScaleDiscrete")
78 | # })
79 | #
80 | # test_that("scale_fill_rickAndMorty works", {
81 | # expect_is(scale_fill_rickAndMorty(), "ScaleDiscrete")
82 | # })
83 |
84 | ## Colors are correct ----
85 | test_that("R&M palette outputs correct colors", {
86 | expect_equal(rickAndMorty_pal()(9),
87 | c( "#01B4C6", ## #01B4C6 R&M turqoise
88 | "#97ce4c", ## #97ce4c R&M green
89 | "#FFF874", ## #FFF874 Morty yellow
90 | "#BEE5FD", ## #BEE5FD Rick blue
91 | "#F675DA", ## #F675DA summer pink
92 | "#44281d", ## regular brown
93 | "#3a4767", ## #3a4767 morty pants navy
94 | "#F8D3AC", ## #7FD112 portal green #F8D3AC skin beige
95 | "#E64358"#, ## #2D8844 portal darker green #E64358 beth red
96 | ))
97 | })
98 |
--------------------------------------------------------------------------------
/docs/pkgdown.js:
--------------------------------------------------------------------------------
1 | /* http://gregfranko.com/blog/jquery-best-practices/ */
2 | (function($) {
3 | $(function() {
4 |
5 | $('.navbar-fixed-top').headroom();
6 |
7 | $('body').css('padding-top', $('.navbar').height() + 10);
8 | $(window).resize(function(){
9 | $('body').css('padding-top', $('.navbar').height() + 10);
10 | });
11 |
12 | $('[data-toggle="tooltip"]').tooltip();
13 |
14 | var cur_path = paths(location.pathname);
15 | var links = $("#navbar ul li a");
16 | var max_length = -1;
17 | var pos = -1;
18 | for (var i = 0; i < links.length; i++) {
19 | if (links[i].getAttribute("href") === "#")
20 | continue;
21 | // Ignore external links
22 | if (links[i].host !== location.host)
23 | continue;
24 |
25 | var nav_path = paths(links[i].pathname);
26 |
27 | var length = prefix_length(nav_path, cur_path);
28 | if (length > max_length) {
29 | max_length = length;
30 | pos = i;
31 | }
32 | }
33 |
34 | // Add class to parent , and enclosing if in dropdown
35 | if (pos >= 0) {
36 | var menu_anchor = $(links[pos]);
37 | menu_anchor.parent().addClass("active");
38 | menu_anchor.closest("li.dropdown").addClass("active");
39 | }
40 | });
41 |
42 | function paths(pathname) {
43 | var pieces = pathname.split("/");
44 | pieces.shift(); // always starts with /
45 |
46 | var end = pieces[pieces.length - 1];
47 | if (end === "index.html" || end === "")
48 | pieces.pop();
49 | return(pieces);
50 | }
51 |
52 | // Returns -1 if not found
53 | function prefix_length(needle, haystack) {
54 | if (needle.length > haystack.length)
55 | return(-1);
56 |
57 | // Special case for length-0 haystack, since for loop won't run
58 | if (haystack.length === 0) {
59 | return(needle.length === 0 ? 0 : -1);
60 | }
61 |
62 | for (var i = 0; i < haystack.length; i++) {
63 | if (needle[i] != haystack[i])
64 | return(i);
65 | }
66 |
67 | return(haystack.length);
68 | }
69 |
70 | /* Clipboard --------------------------*/
71 |
72 | function changeTooltipMessage(element, msg) {
73 | var tooltipOriginalTitle=element.getAttribute('data-original-title');
74 | element.setAttribute('data-original-title', msg);
75 | $(element).tooltip('show');
76 | element.setAttribute('data-original-title', tooltipOriginalTitle);
77 | }
78 |
79 | if(ClipboardJS.isSupported()) {
80 | $(document).ready(function() {
81 | var copyButton = "";
82 |
83 | $("div.sourceCode").addClass("hasCopyButton");
84 |
85 | // Insert copy buttons:
86 | $(copyButton).prependTo(".hasCopyButton");
87 |
88 | // Initialize tooltips:
89 | $('.btn-copy-ex').tooltip({container: 'body'});
90 |
91 | // Initialize clipboard:
92 | var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', {
93 | text: function(trigger) {
94 | return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, "");
95 | }
96 | });
97 |
98 | clipboardBtnCopies.on('success', function(e) {
99 | changeTooltipMessage(e.trigger, 'Copied!');
100 | e.clearSelection();
101 | });
102 |
103 | clipboardBtnCopies.on('error', function() {
104 | changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy');
105 | });
106 | });
107 | }
108 | })(window.jQuery || window.$)
109 |
--------------------------------------------------------------------------------
/R/palette_simpsons.R:
--------------------------------------------------------------------------------
1 | simpsons_palette <- c(
2 | "#fed90f", ## #FFD235 simpsons yellow #ffdb58 mustard #fed90f metallic yellow
3 | "#424f46", ## #424f46 greyish-blue
4 | "#d1b271", ## #d1b271 lightbrownbeige
5 | "#FB4122", ## #f14e28 orangered #F85639 lisa dress
6 | "#ABC67D", ## #7bc242 applegreen #ABC67D marge dress green
7 | "#0363C3", ## #007c7a teal #0363C3 marge blue
8 | "#7A491E", ## #f7b686 beige #7A491E
9 | "#000000", ## #000000 black
10 | "#FC0209", ## bart red
11 | "#46732EFF" ## Flanders green #46732EFF
12 | )
13 |
14 | #' @title The Simpsons palette
15 | #' @description The Simpsons palette
16 | #' @inheritDotParams ggplot2::discrete_scale
17 | #' @param n number of colors
18 | #' @param type discrete or continuous
19 | #' @param reverse reverse order, Default: FALSE
20 | #' @rdname simpsons_pal
21 | #' @export
22 | #' @examples
23 | #' library(scales)
24 | #' show_col(simpsons_pal()(5))
25 | #' @importFrom scales manual_pal
26 | #' @importFrom grDevices colorRampPalette
27 |
28 | simpsons_pal <- function(n,
29 | type = c("discrete", "continuous"),
30 | reverse = FALSE){
31 | simpsons <- simpsons_palette
32 |
33 | if (reverse == TRUE) {
34 | simpsons <- rev(simpsons)
35 | }
36 |
37 | if (missing(n)) {
38 | n <- length(simpsons)
39 | }
40 |
41 | type <- match.arg(type)
42 |
43 | if (type == "discrete" && n > length(simpsons)) {
44 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(simpsons), "!"))
45 | }
46 |
47 | simpsons <- switch(type,
48 | continuous = grDevices::colorRampPalette(simpsons)(n),
49 | discrete = simpsons[1:n])
50 |
51 | simpsons <- scales::manual_pal(simpsons)
52 |
53 | return(simpsons)
54 | }
55 |
56 | #' @title scale_color_simpsons
57 | #' @rdname simpsons_pal
58 | #' @export
59 | #' @examples
60 | #'
61 | #' library(ggplot2)
62 | #' ggplot(airquality, aes(x = Day, y = Temp,
63 | #' group = as.factor(Month), color = as.factor(Month))) +
64 | #' geom_point(size = 2.5) +
65 | #' scale_color_simpsons()
66 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
67 |
68 | scale_color_simpsons <- function(n, type = "discrete",
69 | reverse = FALSE, ...){
70 | if (type == "discrete") {
71 | ggplot2::discrete_scale("color", "simpsons", simpsons_pal(), ...)
72 | } else { ## needs work...
73 | ggplot2::scale_color_gradientn(colors = simpsons_pal(n = n, type = type,
74 | reverse = reverse)(8))
75 | }
76 | }
77 |
78 | #' @title scale_colour_simpsons
79 | #' @rdname simpsons_pal
80 | #' @export
81 | #' @examples
82 | #'
83 | #' ggplot(airquality, aes(x = Day, y = Temp,
84 | #' group = as.factor(Month), color = as.factor(Month))) +
85 | #' geom_point(size = 2.5) +
86 | #' scale_color_simpsons()
87 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
88 |
89 | scale_colour_simpsons <- scale_color_simpsons
90 |
91 | #' @title scale_fill_simpsons
92 | #' @rdname simpsons_pal
93 | #' @export
94 | #' @examples
95 | #'
96 | #' ggplot(mpg, aes(displ)) +
97 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
98 | #' scale_fill_simpsons()
99 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
100 |
101 | scale_fill_simpsons <- function(n, type = "discrete",
102 | reverse = FALSE, ...){
103 | if (type == "discrete") {
104 | ggplot2::discrete_scale("fill", "simpsons", simpsons_pal(), ...)
105 | } else { ## needs work...
106 | ggplot2::scale_fill_gradientn(colors = simpsons_pal(n = n, type = type,
107 | reverse = reverse)(8))
108 | }
109 | }
110 |
111 |
--------------------------------------------------------------------------------
/tests/testthat/test-simpsons.R:
--------------------------------------------------------------------------------
1 | context("test-simpsons")
2 |
3 | expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE)
4 | expect_equal_scales <- function(x, y, ...) {
5 | x <- as.list(x)
6 | y <- as.list(y)
7 | x$call <- y$call <- NULL
8 | expect_equal(x, y, ...)
9 | }
10 |
11 | test_that("theme_simpsons works", {
12 | thm <- theme_simpsons()
13 | expect_s3_class(thm, "theme")
14 | ## font
15 | expect_equal(thm$text$family, "")
16 | expect_null(thm$plot.title$family)
17 | expect_null(thm$legend.title$family)
18 | expect_null(thm$legend.text$family)
19 | ## size
20 | expect_equal(thm$text$size, 14)
21 | expect_equal(thm$plot.title$size, 18)
22 | expect_equal(thm$plot.subtitle$size, 12)
23 | expect_equal(thm$axis.text$size, 10)
24 | expect_equal(thm$axis.title$size, 14)
25 | expect_equal(thm$legend.text$size, 9)
26 | expect_equal(thm$legend.title$size, 10)
27 | ## color
28 | expect_equal(thm$text$colour, "#fee8c8")
29 | expect_equal(thm$plot.title$colour, "#FFD235")
30 | expect_equal(thm$plot.subtitle$colour, "#fee8c8")
31 | expect_equal(thm$axis.text$colour, "#fee8c8")
32 | expect_equal(thm$axis.title$colour, "#fee8c8")
33 | expect_equal(thm$legend.text$colour, "#ffffff")
34 | expect_equal(thm$legend.title$colour, "#ffffff")
35 | expect_equal(thm$legend.position, "bottom")
36 |
37 | ## ticks == TRUE
38 | thm <- theme_simpsons(ticks = TRUE)
39 | expect_s3_class(thm, "theme")
40 | ## font
41 | expect_equal(thm$text$family, "")
42 | expect_null(thm$plot.title$family)
43 | expect_null(thm$legend.title$family)
44 | expect_null(thm$legend.text$family)
45 | ## size
46 | expect_equal(thm$text$size, 14)
47 | expect_equal(thm$plot.title$size, 18)
48 | expect_equal(thm$plot.subtitle$size, 12)
49 | expect_equal(thm$axis.text$size, 10)
50 | expect_equal(thm$axis.title$size, 14)
51 | expect_equal(thm$legend.text$size, 9)
52 | expect_equal(thm$legend.title$size, 10)
53 | ## ticks
54 | expect_equal(thm$axis.ticks$linewidth, 0.15)
55 | ## color
56 | expect_equal(thm$text$colour, "#fee8c8")
57 | expect_equal(thm$plot.title$colour, "#FFD235")
58 | expect_equal(thm$plot.subtitle$colour, "#fee8c8")
59 | expect_equal(thm$axis.text$colour, "#fee8c8")
60 | expect_equal(thm$axis.title$colour, "#fee8c8")
61 | expect_equal(thm$legend.text$colour, "#ffffff")
62 | expect_equal(thm$legend.title$colour, "#ffffff")
63 | expect_equal(thm$legend.position, "bottom")
64 | })
65 |
66 | test_that("simpsons_pal raises warning with large number, x > 10", {
67 | expect_warning(simpsons_pal()(11))
68 | expect_warning(simpsons_pal(reverse = TRUE)(11))
69 | expect_error(simpsons_pal(n = 11))
70 | })
71 |
72 | # test_that("scale_colour_simpsons equals scale_color_simpsons", {
73 | # expect_equal_scales(scale_color_simpsons(), scale_colour_simpsons())
74 | # })
75 | #
76 | # test_that("scale_colour_simpsons works", {
77 | # expect_is(scale_color_simpsons(), "ScaleDiscrete")
78 | # })
79 | #
80 | # test_that("scale_fill_simpsons works", {
81 | # expect_is(scale_fill_simpsons(), "ScaleDiscrete")
82 | # })
83 |
84 | ## Colors are correct ----
85 | test_that("Simpsons palette outputs correct colors", {
86 | expect_equal(simpsons_pal()(10),
87 | c( "#fed90f", ## #FFD235 simpsons yellow #ffdb58 mustard #fed90f metallic yellow
88 | "#424f46", ## #424f46 greyish-blue
89 | "#d1b271", ## #d1b271 lightbrownbeige
90 | "#FB4122", ## #f14e28 orangered #F85639 lisa dress
91 | "#ABC67D", ## #7bc242 applegreen #ABC67D marge dress green
92 | "#0363C3", ## #007c7a teal #0363C3 marge blue
93 | "#7A491E", ## #f7b686 beige #7A491E
94 | "#000000", ## #000000 black
95 | "#FC0209", ## bart red
96 | "#46732EFF" ## Flanders green #46732EFF
97 | ))
98 | })
99 |
--------------------------------------------------------------------------------
/R/palette_bighero6.R:
--------------------------------------------------------------------------------
1 | bigHero6_palette <- c(
2 | "#ffff33", ## gogo yellow #ffff1a #ffff19
3 | "#ffa500", ## honeylemon/fredzilla orange #F84527 #ffa500 #ff8c00
4 | "#4F366F", ## baymax/hiro darkpurple
5 | "#ff0000", ## baymax red
6 | "#00fa9a", ## wasabi green
7 | "#3177D5", ## fredzilla blue #50F2F7
8 | "#c71585", ## honey lemon violet #9400d3 #ff00ff #C70039 #c71585
9 | "#000000" ## black
10 | )
11 |
12 | #' @title Big Hero 6 palette
13 | #' @description Big Hero 6 palette
14 | #' @inheritDotParams ggplot2::discrete_scale
15 | #' @param n number of colors
16 | #' @param type discrete or continuous
17 | #' @param reverse reverse order, Default: FALSE
18 | #' @rdname bigHero6_pal
19 | #' @export
20 | #' @examples
21 | #' library(scales)
22 | #' show_col(bigHero6_pal()(5))
23 | #' @importFrom scales manual_pal
24 | #' @importFrom grDevices colorRampPalette
25 |
26 | bigHero6_pal <- function(n, type = c("discrete", "continuous"),
27 | reverse = FALSE){
28 | bigHero6 <- bigHero6_palette
29 |
30 | if (reverse == TRUE) {
31 | bigHero6 <- rev(bigHero6)
32 | }
33 |
34 | if (missing(n)) {
35 | n <- length(bigHero6)
36 | }
37 |
38 | type <- match.arg(type)
39 |
40 | if (type == "discrete" && n > length(bigHero6)) {
41 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(bigHero6), "!"))
42 | }
43 |
44 | bigHero6 <- switch(type,
45 | continuous = grDevices::colorRampPalette(bigHero6)(n),
46 | discrete = bigHero6[1:n])
47 |
48 | bigHero6 <- scales::manual_pal(bigHero6)
49 |
50 | return(bigHero6)
51 | }
52 |
53 | #' @title scale_color_bigHero6
54 | #' @rdname bigHero6_pal
55 | #' @export
56 | #' @examples
57 | #'
58 | #' library(ggplot2)
59 | #' ggplot(airquality, aes(x = Day, y = Temp,
60 | #' group = as.factor(Month), color = as.factor(Month))) +
61 | #' geom_point(size = 2.5) +
62 | #' scale_color_bigHero6()
63 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
64 |
65 | scale_color_bigHero6 <- function(n, type = "discrete",
66 | reverse = FALSE, ...){
67 | if (type == "discrete") {
68 | ggplot2::discrete_scale("color", "bigHero6",
69 | bigHero6_pal(n = n, type = type,
70 | reverse = reverse), ...)
71 | } else { ## needs work...
72 | ggplot2::scale_color_gradientn(colors = bigHero6_pal(n = n, type = type,
73 | reverse = reverse)(8))
74 | }
75 | }
76 |
77 | #' @title scale_colour_bigHero6
78 | #' @rdname bigHero6_pal
79 | #' @export
80 | #' @examples
81 | #'
82 | #' ggplot(airquality, aes(x = Day, y = Temp,
83 | #' group = as.factor(Month), color = as.factor(Month))) +
84 | #' geom_point(size = 2.5) +
85 | #' scale_colour_bigHero6()
86 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
87 |
88 | scale_colour_bigHero6 <- scale_color_bigHero6
89 |
90 | #' @title scale_fill_bigHero6
91 | #' @rdname bigHero6_pal
92 | #' @export
93 | #' @examples
94 | #'
95 | #' ggplot(mpg, aes(displ)) +
96 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
97 | #' scale_fill_bigHero6()
98 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
99 |
100 | scale_fill_bigHero6 <- function(n, type = "discrete",
101 | reverse = FALSE, ...){
102 | if (type == "discrete") {
103 | ggplot2::discrete_scale("fill", "bigHero6",
104 | bigHero6_pal(n = n, type = type,
105 | reverse = reverse), ...)
106 | } else { ## needs work...
107 | ggplot2::scale_fill_gradientn(colors = bigHero6_pal(n = n, type = type,
108 | reverse = reverse)(8))
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/R/palette_kimpossible.R:
--------------------------------------------------------------------------------
1 | kimPossible_palette <- c(
2 | "#FF8C00", ## KP orange #A75422 #cc8400 #b27300 brighter orange #ffa500 #A65021 #AB5524
3 | "#024663", ## Drakken blue
4 | "#70D423", ## Shego green
5 | "#891604", ## Ron red/burgundy
6 | "#02001F", ## Ron navy
7 | "#9CF6F7", ## KP supersuit lightblue
8 | "#FFCE45", ## Ron yellow hair
9 | "#5D734D", ## KP green eyes
10 | "#FEC3BB", ## Rufus pink
11 | "#662C9C", ## S4 KP combat purple
12 | "#fff9f5", ## white
13 | "#000000" ## black
14 | )
15 |
16 | #' @title Kim Possible palette
17 | #' @description Kim Possible palette
18 | #' @inheritDotParams ggplot2::discrete_scale
19 | #' @param n number of colors
20 | #' @param type discrete or continuous
21 | #' @param reverse reverse order, Default: FALSE
22 | #' @rdname kimPossible_pal
23 | #' @export
24 | #' @examples
25 | #' library(scales)
26 | #' show_col(kimPossible_pal()(5))
27 | #' @importFrom scales manual_pal
28 | #' @importFrom grDevices colorRampPalette
29 |
30 | kimPossible_pal <- function(n, type = c("discrete", "continuous"),
31 | reverse = FALSE){
32 | kimPossible <- kimPossible_palette
33 |
34 | if (reverse == TRUE) {
35 | kimPossible <- rev(kimPossible)
36 | }
37 |
38 | if (missing(n)) {
39 | n <- length(kimPossible)
40 | }
41 |
42 | type <- match.arg(type)
43 |
44 | if (type == "discrete" && n > length(kimPossible)) {
45 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(kimPossible), "!"))
46 | }
47 |
48 | kimPossible <- switch(type,
49 | continuous = grDevices::colorRampPalette(kimPossible)(n),
50 | discrete = kimPossible[1:n])
51 |
52 | kimPossible <- scales::manual_pal(kimPossible)
53 |
54 | return(kimPossible)
55 | }
56 |
57 | #' @title scale_color_kimPossible
58 | #' @rdname kimPossible_pal
59 | #' @export
60 | #' @examples
61 | #'
62 | #' library(ggplot2)
63 | #' ggplot(airquality, aes(x = Day, y = Temp,
64 | #' group = as.factor(Month), color = as.factor(Month))) +
65 | #' geom_point(size = 2.5) +
66 | #' scale_color_kimPossible()
67 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
68 |
69 | scale_color_kimPossible <- function(n, type = "discrete",
70 | reverse = FALSE, ...){
71 | if (type == "discrete") {
72 | ggplot2::discrete_scale("color", "kimPossible", kimPossible_pal(), ...)
73 | } else { ## needs work...
74 | ggplot2::scale_color_gradientn(colors = kimPossible_pal(n = n, type = type,
75 | reverse = reverse)(8))
76 | }
77 | }
78 |
79 | #' @title scale_colour_kimPossible
80 | #' @rdname kimPossible_pal
81 | #' @export
82 | #' @examples
83 | #'
84 | #' ggplot(airquality, aes(x = Day, y = Temp,
85 | #' group = as.factor(Month), color = as.factor(Month))) +
86 | #' geom_point(size = 2.5) +
87 | #' scale_colour_kimPossible()
88 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
89 |
90 | scale_colour_kimPossible <- scale_color_kimPossible
91 |
92 | #' @title scale_fill_kimPossible
93 | #' @rdname kimPossible_pal
94 | #' @export
95 | #' @examples
96 | #'
97 | #' ggplot(mpg, aes(displ)) +
98 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
99 | #' scale_fill_kimPossible()
100 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
101 |
102 | scale_fill_kimPossible <- function(n, type = "discrete",
103 | reverse = FALSE, ...){
104 | if (type == "discrete") {
105 | ggplot2::discrete_scale("fill", "kimPossible", kimPossible_pal(), ...)
106 | } else { ## needs work...
107 | ggplot2::scale_fill_gradientn(colors = kimPossible_pal(n = n, type = type,
108 | reverse = reverse)(8))
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/R/palette_spongebob.R:
--------------------------------------------------------------------------------
1 | spongeBob_palette <- c(
2 | "#C86925", ## brownpants
3 | "#FDF56C", ## sponge yellow
4 | "#FC9576", ## patrick pink
5 | "#5D57AF", ## patrick purple
6 | "#B2CE31", ## patrick green
7 | "#FF2027", ## mr.krabs red
8 | "#B1D6C5", ## squidward blue
9 | "#AB8323", ## squidward shirt brown
10 | "#000000" ## black
11 | )
12 |
13 |
14 | #C86925 ## brownpants
15 | #FDF56C ## sponge yellow
16 | #C4433F ## sponge tie red
17 | #989B46 ## kelp green
18 | #FC9576 ## patrick pink
19 | #5D57AF ## patrick purple
20 | #B2CE31 ## patrick green
21 | #FF2027 ## mr.krabs red
22 | #000000 ## black
23 | #B1D6C5 ## squidward blue
24 | #AB8323 ## squidward shirt brown
25 |
26 | #' @title Spongebob Squarepants palette
27 | #' @description Spongebob Squarepants palette
28 | #' @inheritDotParams ggplot2::discrete_scale
29 | #' @param n number of colors
30 | #' @param type discrete or continuous
31 | #' @param reverse reverse order, Default: FALSE
32 | #' @rdname spongeBob_pal
33 | #' @export
34 | #' @examples
35 | #' library(scales)
36 | #' show_col(spongeBob_pal()(5))
37 | #' @importFrom scales manual_pal
38 | #' @importFrom grDevices colorRampPalette
39 |
40 | spongeBob_pal <- function(n, type = c("discrete", "continuous"),
41 | reverse = FALSE){
42 | spongeBob <- spongeBob_palette
43 |
44 | if (reverse == TRUE) {
45 | spongeBob <- rev(spongeBob)
46 | }
47 |
48 | if (missing(n)) {
49 | n <- length(spongeBob)
50 | }
51 |
52 | type <- match.arg(type)
53 |
54 | if (type == "discrete" && n > length(spongeBob)) {
55 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(spongeBob), "!"))
56 | }
57 |
58 | spongeBob <- switch(type,
59 | continuous = grDevices::colorRampPalette(spongeBob)(n),
60 | discrete = spongeBob[1:n])
61 |
62 | spongeBob <- scales::manual_pal(spongeBob)
63 |
64 | return(spongeBob)
65 | }
66 |
67 | #' @title scale_color_spongeBob
68 | #' @rdname spongeBob_pal
69 | #' @export
70 | #' @examples
71 | #'
72 | #' library(ggplot2)
73 | #' ggplot(airquality, aes(x = Day, y = Temp,
74 | #' group = as.factor(Month), color = as.factor(Month))) +
75 | #' geom_point(size = 2.5) +
76 | #' scale_color_spongeBob()
77 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
78 |
79 | scale_color_spongeBob <- function(n, type = "discrete",
80 | reverse = FALSE, ...){
81 | if (type == "discrete") {
82 | ggplot2::discrete_scale("color", "spongeBob", spongeBob_pal(), ...)
83 | } else { ## needs work...
84 | ggplot2::scale_color_gradientn(colors = spongeBob_pal(n = n, type = type,
85 | reverse = reverse)(8))
86 | }
87 | }
88 |
89 | #' @title scale_colour_spongeBob
90 | #' @rdname spongeBob_pal
91 | #' @export
92 | #' @examples
93 | #'
94 | #' ggplot(airquality, aes(x = Day, y = Temp,
95 | #' group = as.factor(Month), color = as.factor(Month))) +
96 | #' geom_point(size = 2.5) +
97 | #' scale_color_spongeBob()
98 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
99 |
100 | scale_colour_spongeBob <- scale_color_spongeBob
101 |
102 | #' @title scale_fill_spongeBob
103 | #' @rdname spongeBob_pal
104 | #' @export
105 | #' @examples
106 | #'
107 | #' ggplot(mpg, aes(displ)) +
108 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
109 | #' scale_fill_spongeBob()
110 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
111 |
112 | scale_fill_spongeBob <- function(n, type = "discrete",
113 | reverse = FALSE, ...){
114 | if (type == "discrete") {
115 | ggplot2::discrete_scale("fill", "spongeBob", spongeBob_pal(), ...)
116 | } else { ## needs work...
117 | ggplot2::scale_fill_gradientn(colors = spongeBob_pal(n = n, type = type,
118 | reverse = reverse)(8))
119 | }
120 |
121 | }
122 |
--------------------------------------------------------------------------------
/R/palette_attackontitan.R:
--------------------------------------------------------------------------------
1 | attackOnTitan_palette <- c(
2 | "#004c00", ## cape green #42694a #004c00 #004000 #3C4D3D
3 | "#173357", ## survey corp blue
4 | "#3E1E13", ## jacket brown lightbrown #6f553f
5 | "#e50000", ## titan red #BF2F1F
6 | "#999BA0", ## blade steel
7 | "#c8a780", ## jacket lighttan
8 | "#EB6154", ## titan skin pink
9 | "#000000" ## black
10 | )
11 |
12 | #' @title Attack On Titan palette
13 | #' @description Attack On Titan palette
14 | #' @inheritDotParams ggplot2::discrete_scale
15 | #' @param n number of colors
16 | #' @param type discrete or continuous
17 | #' @param reverse reverse order, Default: FALSE
18 | #' @rdname attackOnTitan_pal
19 | #' @examples
20 | #' library(scales)
21 | #' show_col(attackOnTitan_pal()(5))
22 | #' @export
23 | #' @importFrom scales manual_pal
24 | #' @importFrom grDevices colorRampPalette
25 |
26 | attackOnTitan_pal <- function(n, type = c("discrete", "continuous"),
27 | reverse = FALSE){
28 | attackOnTitan <- attackOnTitan_palette
29 |
30 | if (reverse == TRUE) {
31 | attackOnTitan <- rev(attackOnTitan)
32 | }
33 |
34 | if (missing(n)) {
35 | n <- length(attackOnTitan)
36 | }
37 |
38 | type <- match.arg(type)
39 |
40 | if (type == "discrete" && n > length(attackOnTitan)) {
41 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(attackOnTitan), "!"))
42 | }
43 |
44 | attackOnTitan <- switch(type,
45 | continuous = grDevices::colorRampPalette(attackOnTitan)(n),
46 | discrete = attackOnTitan[1:n])
47 |
48 | attackOnTitan <- scales::manual_pal(attackOnTitan)
49 |
50 | return(attackOnTitan)
51 | }
52 |
53 | #' @title scale_color_attackOnTitan
54 | #' @rdname attackOnTitan_pal
55 | #' @export
56 | #' @examples
57 | #'
58 | #' library(ggplot2)
59 | #' ggplot(airquality, aes(x = Day, y = Temp,
60 | #' group = as.factor(Month), color = as.factor(Month))) +
61 | #' geom_point(size = 2.5) +
62 | #' scale_color_attackOnTitan()
63 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
64 |
65 | scale_color_attackOnTitan <- function(n, type = "discrete",
66 | reverse = FALSE, ...){
67 | if (type == "discrete") {
68 | ggplot2::discrete_scale("color", "attackOnTitan",
69 | attackOnTitan_pal(n = n, type = type,
70 | reverse = reverse), ...)
71 | } else {
72 | ggplot2::scale_color_gradientn(colors = attackOnTitan_pal(n = n, type = type,
73 | reverse = reverse)(8))
74 | }
75 | }
76 |
77 | #' @title scale_colour_attackOnTitan
78 | #' @rdname attackOnTitan_pal
79 | #' @export
80 | #' @examples
81 | #'
82 | #' ggplot(airquality, aes(x = Day, y = Temp,
83 | #' group = as.factor(Month), color = as.factor(Month))) +
84 | #' geom_point(size = 2.5) +
85 | #' scale_colour_attackOnTitan()
86 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
87 |
88 | scale_colour_attackOnTitan <- scale_color_attackOnTitan
89 |
90 | #' @title scale_fill_attackOnTitan
91 | #' @rdname attackOnTitan_pal
92 | #' @export
93 | #' @examples
94 | #'
95 | #' ggplot(mpg, aes(displ)) +
96 | #' geom_histogram(aes(fill = class),
97 | #' col = "black", size = 0.1) +
98 | #' scale_fill_attackOnTitan()
99 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
100 |
101 | scale_fill_attackOnTitan <- function(n, type = "discrete",
102 | reverse = FALSE, ...){
103 | if (type == "discrete") {
104 | ggplot2::discrete_scale("fill", "attackOnTitan",
105 | attackOnTitan_pal(n = n, type = type,
106 | reverse = reverse), ...)
107 | } else {
108 | ggplot2::scale_fill_gradientn(colors = attackOnTitan_pal(n = n, type = type,
109 | reverse = reverse)(8))
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/R/palette_rickandmorty.R:
--------------------------------------------------------------------------------
1 | rickAndMorty_palette <- c(
2 | "#01B4C6", ## #01B4C6 R&M turqoise
3 | "#97ce4c", ## #97ce4c R&M green
4 | "#FFF874", ## #FFF874 Morty yellow
5 | "#BEE5FD", ## #BEE5FD Rick blue
6 | "#F675DA", ## #F675DA summer pink
7 | "#44281d", ## regular brown
8 | "#3a4767", ## #3a4767 morty pants navy
9 | "#F8D3AC", ## #7FD112 portal green #F8D3AC skin beige
10 | "#E64358"#, ## #2D8844 portal darker green #E64358 beth red
11 | #"#ededee" ## light grey
12 | )
13 |
14 | ## various blue-turqoise shades
15 | # #02afc5
16 | # #35c9dd
17 | # #87d1db
18 | # #a9f3fd
19 | # #4cb5c3
20 |
21 | #' @title Rick & Morty color palette
22 | #' @description Rick & Morty color palette
23 | #' @inheritDotParams ggplot2::discrete_scale
24 | #' @param n number of colors
25 | #' @param type discrete or continuous
26 | #' @param reverse reverse order, Default: FALSE
27 | #' @rdname rickAndMorty_pal
28 | #' @export
29 | #' @examples
30 | #' library(scales)
31 | #' show_col(rickAndMorty_pal()(5))
32 | #' @importFrom scales manual_pal
33 | #' @importFrom grDevices colorRampPalette
34 |
35 | rickAndMorty_pal <- function(n,
36 | type = c("discrete", "continuous"),
37 | reverse = FALSE){
38 | rickAndMorty <- rickAndMorty_palette
39 |
40 | if (reverse == TRUE) {
41 | rickAndMorty <- rev(rickAndMorty)
42 | }
43 |
44 | if (missing(n)) {
45 | n <- length(rickAndMorty)
46 | }
47 |
48 | type <- match.arg(type)
49 |
50 | if (type == "discrete" && n > length(rickAndMorty)) {
51 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(rickAndMorty), "!"))
52 | }
53 |
54 | rickAndMorty <- switch(type,
55 | continuous = grDevices::colorRampPalette(rickAndMorty)(n),
56 | discrete = rickAndMorty[1:n])
57 |
58 | rickAndMorty <- scales::manual_pal(rickAndMorty)
59 |
60 | return(rickAndMorty)
61 | }
62 |
63 | #' @title scale_color_rickAndMorty
64 | #' @rdname rickAndMorty_pal
65 | #' @export
66 | #' @examples
67 | #'
68 | #' library(ggplot2)
69 | #' ggplot(airquality, aes(x = Day, y = Temp,
70 | #' group = as.factor(Month), color = as.factor(Month))) +
71 | #' geom_point(size = 2.5) +
72 | #' scale_color_rickAndMorty()
73 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
74 |
75 | scale_color_rickAndMorty <- function(n, type = "discrete",
76 | reverse = FALSE, ...){
77 | if (type == "discrete") {
78 | ggplot2::discrete_scale("color", "rickAndMorty", rickAndMorty_pal(), ...)
79 | } else { ## needs work...
80 | ggplot2::scale_color_gradientn(colors = rickAndMorty_pal(n = n, type = type,
81 | reverse = reverse)(8))
82 | }
83 | }
84 |
85 | #' @title scale_colour_rickAndMorty
86 | #' @rdname rickAndMorty_pal
87 | #' @export
88 | #' @examples
89 | #'
90 | #' ggplot(airquality, aes(x = Day, y = Temp,
91 | #' group = as.factor(Month), color = as.factor(Month))) +
92 | #' geom_point(size = 2.5) +
93 | #' scale_colour_rickAndMorty()
94 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
95 |
96 | scale_colour_rickAndMorty <- scale_color_rickAndMorty
97 |
98 | #' @title scale_fill_rickAndMorty
99 | #' @rdname rickAndMorty_pal
100 | #' @export
101 | #' @examples
102 | #'
103 | #' ggplot(mpg, aes(displ)) +
104 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
105 | #' scale_fill_rickAndMorty()
106 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
107 |
108 | scale_fill_rickAndMorty <- function(n, type = "discrete",
109 | reverse = FALSE, ...){
110 | if (type == "discrete") {
111 | ggplot2::discrete_scale("fill", "rickAndMorty", rickAndMorty_pal(), ...)
112 | } else { ## needs work...
113 | ggplot2::scale_fill_gradientn(colors = rickAndMorty_pal(n = n, type = type,
114 | reverse = reverse)(8))
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/R/theme_rickandmorty.R:
--------------------------------------------------------------------------------
1 | #' @title Rick & Morty theme
2 | #' @description Rick & Morty theme, Recommended font: "Get Schwifty"
3 | #' @details Actual font is based on Justin Roiland's handwriting!
4 | #' @param text.font text font, Default: NULL
5 | #' @param title.font title font, Default: NULL
6 | #' @param legend.font legend font, Default: NULL
7 | #' @param title.size title size, Default: 20
8 | #' @param text.size text font size, Default: 12
9 | #' @param subtitle.size subtitle font size, Default: 14
10 | #' @param axis.title.size axis title font size, Default: 14
11 | #' @param axis.text.size axis text font size, Default: 10
12 | #' @param legend.title.size legend title font size, Default: 10
13 | #' @param legend.text.size legend text font size, Default: 9
14 | #' @param title.color title color, Default: NULL
15 | #' @param subtitle.color subtitle.color, Default: NULL
16 | #' @param text.color text color, Default: NULL
17 | #' @param axis.title.color axis title color, Default: NULL
18 | #' @param axis.text.color axis text color, Default: "black"
19 | #' @param legend.title.color legend title color, Default: NULL
20 | #' @param legend.text.color legend text color, Default: NULL
21 | #' @param legend.position legend position, Default: "bottom"
22 | #' @param ticks add axis ticks, Default: FALSE
23 | #' @examples
24 | #' library(ggplot2)
25 | #'
26 | #' ggplot(airquality, aes(x = Day, y = Temp,
27 | #' group = as.factor(Month), color = as.factor(Month))) +
28 | #' geom_point(size = 2.5) +
29 | #' scale_color_rickAndMorty() +
30 | #' theme_rickAndMorty()
31 | #' @rdname theme_rickAndMorty
32 | #' @seealso [ggplot2::theme]
33 | #' @importFrom ggplot2 theme element_text element_rect element_blank element_line
34 | #' theme_minimal
35 | #' @importFrom grid unit
36 | #' @export
37 |
38 | theme_rickAndMorty <- function(
39 | text.font = NULL,
40 | title.font = NULL,
41 | legend.font = NULL,
42 | title.size = 20,
43 | text.size = 12,
44 | subtitle.size = 14,
45 | axis.title.size = 14,
46 | axis.text.size = 10,
47 | legend.title.size = 10,
48 | legend.text.size = 9,
49 | title.color = NULL,
50 | subtitle.color = NULL,
51 | text.color = NULL,
52 | axis.title.color = NULL,
53 | axis.text.color = "black",
54 | legend.title.color = NULL,
55 | legend.text.color = NULL,
56 | legend.position = "bottom",
57 | ticks = FALSE){
58 |
59 | pickleRick <- ggplot2::theme_minimal() +
60 | theme(text = element_text(family = text.font, size = text.size, color = text.color),
61 | plot.title = element_text(family = title.font, size = title.size, color = title.color),
62 | plot.subtitle = element_text(family = title.font, size = subtitle.size, color = subtitle.color),
63 | # axis options
64 | axis.text = element_text(family = text.font, size = axis.text.size, color = axis.text.color),
65 | axis.title = element_text(family = title.font, size = axis.title.size, color = axis.title.color),
66 | # background/panel options
67 | plot.background = element_rect(color = NA, fill = "#9bff16"),
68 | panel.background = element_rect(color = NA, fill = "#cfdbbe"),
69 | panel.grid.major.x = element_blank(),
70 | # legend options
71 | legend.text = element_text(family = legend.font, size = legend.text.size, color = legend.text.color),
72 | legend.title = element_text(family = legend.font, size = legend.title.size, color = legend.title.color),
73 | legend.position = legend.position,
74 | legend.background = element_rect(color = "black", fill = "#9bff16", linetype = "solid")
75 | )
76 |
77 | if (ticks == FALSE) {
78 | pickleRick <- pickleRick + theme(axis.ticks = element_blank(),
79 | axis.ticks.x = element_blank(),
80 | axis.ticks.y = element_blank())
81 | } else {
82 | pickleRick <- pickleRick + theme(axis.ticks = element_line(linewidth = 0.15, color = "white"),
83 | axis.ticks.x = element_line(linewidth = 0.15, color = "white"),
84 | axis.ticks.y = element_line(linewidth = 0.15, color = "white"),
85 | axis.ticks.length = grid::unit(4, "pt"))
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/R/palette_parksAndRec.R:
--------------------------------------------------------------------------------
1 | ## Parks & Rec regular palette ----
2 | parksAndRec_palette <- c(
3 | "#bdbdbd", ## yellowtan #fcf7e8 grey #969696 #bdbdbd
4 | "#a51209", ## maroon
5 | "#ffdb58", ## lighter green (turqoise-ish) #238443 #ffdb58 mustard
6 | "#ec7014", ## #4C3114 darker brown #ec7014 darker orange
7 | "#7A491E", ## regular brown
8 | "#C24841", ## darker reddish-orange
9 | "#005502", ## darker green
10 | "#f7fcb9", ## lime green <<<<
11 | "#69983a", ## lightish gree #1A5E1F darkgreen
12 | "#b5651d" ## beige #fee0d2 #b5651d light brown
13 | )
14 |
15 | #1A5E1FFF ## darkgreen
16 | #CCFFBB ## lime green
17 | #238443 ## lighter green
18 | #4C3114 ## darker brown
19 | #7A491E ## regular brown
20 | #005502 ## darker green
21 | #fcf7e8 ## grass green
22 |
23 | #' @title Parks & Recreation palette
24 | #' @description Parks & Recreation palette
25 | #' @inheritDotParams ggplot2::discrete_scale
26 | #' @param n number of colors
27 | #' @param type discrete or continuous
28 | #' @param reverse reverse order, Default: FALSE
29 | #' @rdname parksAndRec_pal
30 | #' @export
31 | #' @examples
32 | #' library(scales)
33 | #' show_col(parksAndRec_pal()(5))
34 | #' @importFrom scales manual_pal
35 | #' @importFrom grDevices colorRampPalette
36 |
37 | parksAndRec_pal <- function(n,
38 | type = c("discrete", "continuous"),
39 | reverse = FALSE){
40 | parksAndRec <- parksAndRec_palette
41 |
42 | if (reverse == TRUE) {
43 | parksAndRec <- rev(parksAndRec)
44 | }
45 |
46 | if (missing(n)) {
47 | n <- length(parksAndRec)
48 | }
49 |
50 | type <- match.arg(type)
51 |
52 | if (type == "discrete" && n > length(parksAndRec)) {
53 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(parksAndRec), "!"))
54 | }
55 |
56 | parksAndRec <- switch(type,
57 | continuous = grDevices::colorRampPalette(parksAndRec)(n),
58 | discrete = parksAndRec[1:n])
59 |
60 | parksAndRec <- scales::manual_pal(parksAndRec)
61 |
62 | return(parksAndRec)
63 | }
64 |
65 | #' @title scale_color_parksAndRec
66 | #' @rdname parksAndRec_pal
67 | #' @export
68 | #' @examples
69 | #'
70 | #' library(ggplot2)
71 | #' ggplot(airquality, aes(x = Day, y = Temp,
72 | #' group = as.factor(Month), color = as.factor(Month))) +
73 | #' geom_point(size = 2.5) +
74 | #' scale_color_parksAndRec()
75 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
76 |
77 | scale_color_parksAndRec <- function(n, type = "discrete",
78 | reverse = FALSE, ...){
79 | if (type == "discrete") {
80 | ggplot2::discrete_scale("color", "parksAndRec", parksAndRec_pal(), ...)
81 | } else { ## needs work...
82 | ggplot2::scale_color_gradientn(colors = parksAndRec_pal(n = n, type = type,
83 | reverse = reverse)(8))
84 | }
85 | }
86 |
87 | #' @title scale_colour_parksAndRec
88 | #' @rdname parksAndRec_pal
89 | #' @export
90 | #' @examples
91 | #'
92 | #' ggplot(airquality, aes(x = Day, y = Temp,
93 | #' group = as.factor(Month), color = as.factor(Month))) +
94 | #' geom_point(size = 2.5) +
95 | #' scale_colour_parksAndRec()
96 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
97 |
98 | scale_colour_parksAndRec <- scale_color_parksAndRec
99 |
100 | #' @title scale_fill_parksAndRec
101 | #' @rdname parksAndRec_pal
102 | #' @export
103 | #' @examples
104 | #'
105 | #' ggplot(mpg, aes(displ)) +
106 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
107 | #' scale_fill_parksAndRec()
108 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
109 |
110 | scale_fill_parksAndRec <- function(n, type = "discrete",
111 | reverse = FALSE, ...){
112 | if (type == "discrete") {
113 | ggplot2::discrete_scale("fill", "parksAndRec", parksAndRec_pal(), ...)
114 | } else { ## needs work...
115 | ggplot2::scale_fill_gradientn(colors = parksAndRec_pal(n = n, type = type,
116 | reverse = reverse)(8))
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/R/palette_gravityfalls.R:
--------------------------------------------------------------------------------
1 | gravityFalls_palette <- c(
2 | "#417BA1", ## dipper light blue
3 | "#ff1493", ## mabel pink #DF504C
4 | "#ffff2e", ## bill cipher yellow #ffff2e #fff400
5 | "#345634", ## soos green
6 | "#8b0000", ## fez burgundy #8b0000 #732335
7 | "#ff6700", ## wendy orange
8 | "#93C0D5", ## lil gideon skyblue
9 | "#8b4513", ## mcgucket brown #8b4513 #8E6537
10 | "#9248A7", ## pacifica purple
11 | "#1c8859", ## wendy green
12 | "#474747", ## grunkle grey
13 | "#8fbc8f", ## sheriff blubs green
14 | "#d2b48c", ## stanford coat beige #d2b48c #dfbe58
15 | "#000000" ## robbie black
16 | )
17 |
18 | #' @title Gravity Falls palette
19 | #' @description Gravity Falls palette
20 | #' @inheritDotParams ggplot2::discrete_scale
21 | #' @param n number of colors
22 | #' @param type discrete or continuous
23 | #' @param reverse reverse order, Default: FALSE
24 | #' @rdname gravityFalls_pal
25 | #' @export
26 | #' @examples
27 | #' library(scales)
28 | #' show_col(gravityFalls_pal()(5))
29 | #' @importFrom scales manual_pal
30 | #' @importFrom grDevices colorRampPalette
31 |
32 | gravityFalls_pal <- function(n, type = c("discrete", "continuous"),
33 | reverse = FALSE){
34 | gravityFalls <- gravityFalls_palette
35 |
36 | if (reverse == TRUE) {
37 | gravityFalls <- rev(gravityFalls)
38 | }
39 |
40 | if (missing(n)) {
41 | n <- length(gravityFalls)
42 | }
43 |
44 | type <- match.arg(type)
45 |
46 | if (type == "discrete" && n > length(gravityFalls)) {
47 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(gravityFalls), "!"))
48 | }
49 |
50 | gravityFalls <- switch(type,
51 | continuous = grDevices::colorRampPalette(gravityFalls)(n),
52 | discrete = gravityFalls[1:n])
53 |
54 | gravityFalls <- scales::manual_pal(gravityFalls)
55 |
56 | return(gravityFalls)
57 | }
58 |
59 | #' @title scale_color_gravityFalls
60 | #' @rdname gravityFalls_pal
61 | #' @export
62 | #' @examples
63 | #'
64 | #' library(ggplot2)
65 | #' ggplot(airquality, aes(x = Day, y = Temp,
66 | #' group = as.factor(Month), color = as.factor(Month))) +
67 | #' geom_point(size = 3.5) +
68 | #' scale_color_gravityFalls()
69 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
70 |
71 | scale_color_gravityFalls <- function(n, type = "discrete",
72 | reverse = FALSE, ...){
73 | if (type == "discrete") {
74 | ggplot2::discrete_scale("color", "gravityFalls",
75 | gravityFalls_pal(n = n, type = type,
76 | reverse = reverse), ...)
77 | } else { ## needs work...
78 | ggplot2::scale_color_gradientn(colors = gravityFalls_pal(n = n, type = type,
79 | reverse = reverse)(8))
80 | }
81 | }
82 |
83 | #' @title scale_colour_gravityFalls
84 | #' @rdname gravityFalls_pal
85 | #' @export
86 | #' @examples
87 | #'
88 | #' ggplot(airquality, aes(x = Day, y = Temp,
89 | #' group = as.factor(Month), color = as.factor(Month))) +
90 | #' geom_point(size = 3.5) +
91 | #' scale_colour_gravityFalls()
92 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
93 |
94 | scale_colour_gravityFalls <- scale_color_gravityFalls
95 |
96 | #' @title scale_fill_gravityFalls
97 | #' @rdname gravityFalls_pal
98 | #' @export
99 | #' @examples
100 | #'
101 | #' ggplot(mpg, aes(displ)) +
102 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
103 | #' scale_fill_gravityFalls()
104 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
105 |
106 | scale_fill_gravityFalls <- function(n, type = "discrete",
107 | reverse = FALSE, ...){
108 | if (type == "discrete") {
109 | ggplot2::discrete_scale("fill", "gravityFalls",
110 | gravityFalls_pal(n = n, type = type,
111 | reverse = reverse), ...)
112 | } else { ## needs work...
113 | ggplot2::scale_fill_gradientn(colors = gravityFalls_pal(n = n, type = type,
114 | reverse = reverse)(8))
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/R/theme_spongebob.R:
--------------------------------------------------------------------------------
1 | #' @title Spongebob Squarepants theme
2 | #' @description Spongebob Squarepants theme, Recommended font: "Some Time Later"
3 | #' @details Spongbobify your plots even more by combining with `paintBikiniBottom()`!
4 | #' @param text.font text font, Default: NULL
5 | #' @param title.font title font, Default: NULL
6 | #' @param legend.font legend font, Default: NULL
7 | #' @param title.size size of title, Default: 18
8 | #' @param text.size text font size, Default: 12
9 | #' @param subtitle.size subtitle font size, Default:12
10 | #' @param axis.title.size axis title font size, Default: 14
11 | #' @param axis.text.size axis text font size, Default: 12
12 | #' @param legend.title.size legend title font size, Default: 10
13 | #' @param legend.text.size legend text font size, Default: 9
14 | #' @param title.color title color, Default: "F9FEFF"
15 | #' @param subtitle.color subtitle.color, Default: "F9FEFF"
16 | #' @param text.color text color, Default: "F9FEFF"
17 | #' @param axis.title.color axis title color, Default: "F9FEFF"
18 | #' @param axis.text.color axis text color, Default: "F9FEFF"
19 | #' @param legend.title.color legend title color, Default: "F9FEFF"
20 | #' @param legend.text.color legend text color, Default: "F9FEFF"
21 | #' @param legend.position legend position, Default: "bottom"
22 | #' @param ticks add axis ticks, Default: FALSE
23 | #' @examples
24 | #' library(ggplot2)
25 | #'
26 | #' ggplot(airquality, aes(x = Day, y = Temp,
27 | #' group = as.factor(Month), color = as.factor(Month))) +
28 | #' geom_point(size = 2.5) +
29 | #' scale_color_spongeBob() +
30 | #' theme_spongeBob()
31 | #' @rdname theme_spongeBob
32 | #' @seealso [tvthemes::paintBikiniBottom]
33 | #' @importFrom ggplot2 theme element_text element_rect element_blank element_line
34 | #' theme_minimal
35 | #' @importFrom grid unit
36 | #' @export
37 |
38 | theme_spongeBob <- function(
39 | text.font = NULL,
40 | title.font = NULL,
41 | legend.font = NULL,
42 | title.size = 18,
43 | text.size = 12,
44 | subtitle.size = 12,
45 | axis.title.size = 14,
46 | axis.text.size = 12,
47 | legend.title.size = 10,
48 | legend.text.size = 9,
49 | title.color = "#F9FEFF",
50 | subtitle.color = "#F9FEFF",
51 | text.color = "#F9FEFF",
52 | axis.title.color = "#F9FEFF",
53 | axis.text.color = "#F9FEFF",
54 | legend.title.color = "#F9FEFF",
55 | legend.text.color = "#F9FEFF",
56 | legend.position = "bottom",
57 | ticks = FALSE){
58 |
59 | bobspog <- ggplot2::theme_minimal() +
60 | theme(text = element_text(family = text.font, size = text.size, color = text.color),
61 | plot.title = element_text(family = title.font, size = title.size, color = title.color),
62 | plot.subtitle = element_text(family = title.font, size = subtitle.size, color = subtitle.color),
63 | # background/panel options
64 | plot.background = element_rect(color = NA, fill = "#21B8E3"),
65 | panel.background = element_rect(color = NA, fill = "#21B8E3"),
66 | # axis options
67 | axis.text = element_text(family = text.font, size = axis.text.size, color = axis.text.color),
68 | axis.title = element_text(family = title.font, size = axis.title.size, color = axis.title.color),
69 | # legend options
70 | legend.text = element_text(family = legend.font, size = legend.text.size, color = legend.text.color),
71 | legend.title = element_text(family = legend.font, size = legend.title.size, color = legend.title.color),
72 | legend.position = legend.position,
73 | legend.key = element_rect(colour = "black", linetype = "solid", linewidth = 1.25),
74 | legend.background = element_rect(color = "black", fill = "#21B8E3", linetype = "solid")
75 | )
76 |
77 | if (ticks == FALSE) {
78 | bobspog <- bobspog + theme(axis.ticks = element_blank(),
79 | axis.ticks.x = element_blank(),
80 | axis.ticks.y = element_blank())
81 | } else {
82 | bobspog <- bobspog + theme(axis.ticks = element_line(linewidth = 0.15, color = "white"),
83 | axis.ticks.x = element_line(linewidth = 0.15, color = "white"),
84 | axis.ticks.y = element_line(linewidth = 0.15, color = "white"),
85 | axis.ticks.length = grid::unit(4, "pt"))
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/R/theme_simpsons.R:
--------------------------------------------------------------------------------
1 | #' @title The Simpsons theme
2 | #' @description The Simpsons theme, Recommended font: "Akbar"
3 | #' @details In part inspired by `@nathancunn`'s blog posts on The Simpsons!
4 | #' @param text.font text font, Default: NULL
5 | #' @param title.font title font, Default: NULL
6 | #' @param legend.font legend font, Default: NULL
7 | #' @param title.size title font size, Default: 18
8 | #' @param text.size text font size, Default: 14
9 | #' @param subtitle.size subtitle font size, Default: 12
10 | #' @param axis.title.size axis title font size, Default: 14
11 | #' @param axis.text.size axis text font size, Default: 10
12 | #' @param legend.title.size legend title font size, Default: 10
13 | #' @param legend.text.size legend text font size, Default: 9
14 | #' @param title.color title color, Default: "#FFD235"
15 | #' @param subtitle.color subtitle.color, Default: "#fee8c8"
16 | #' @param text.color text color, Default: "#fee8c8"
17 | #' @param axis.title.color axis title color, Default: "#fee8c8"
18 | #' @param axis.text.color axis text color, Default: "#fee8c8"
19 | #' @param legend.title.color legend title color, Default: "#ffffff"
20 | #' @param legend.text.color legend text color, Default: "#ffffff"
21 | #' @param legend.position legend position, Default: "bottom"
22 | #' @param ticks add axis ticks, Default: FALSE
23 | #' @examples
24 | #' library(ggplot2)
25 | #'
26 | #' ggplot(airquality, aes(x = Day, y = Temp,
27 | #' group = as.factor(Month), color = as.factor(Month))) +
28 | #' geom_point(size = 2.5) +
29 | #' scale_color_simpsons() +
30 | #' theme_simpsons()
31 | #' @rdname theme_simpsons
32 | #' @seealso [ggplot2::theme]
33 | #' @importFrom ggplot2 theme element_text element_rect element_blank element_line
34 | #' theme_minimal
35 | #' @importFrom grid unit
36 | #' @export
37 |
38 | theme_simpsons <- function(
39 | text.font = NULL,
40 | title.font = NULL,
41 | legend.font = NULL,
42 | title.size = 18,
43 | text.size = 14,
44 | subtitle.size = 12,
45 | axis.title.size = 14,
46 | axis.text.size = 10,
47 | legend.title.size = 10,
48 | legend.text.size = 9,
49 | title.color = "#FFD235",
50 | subtitle.color = "#fee8c8",
51 | text.color = "#fee8c8",
52 | axis.title.color = "#fee8c8",
53 | axis.text.color = "#fee8c8",
54 | legend.title.color = "#ffffff",
55 | legend.text.color = "#ffffff",
56 | legend.position = "bottom",
57 | ticks = FALSE){
58 |
59 | simpsons <- ggplot2::theme_minimal() +
60 | theme(text = element_text(family = text.font, size = text.size, color = text.color),
61 | plot.title = element_text(family = title.font, size = title.size, color = title.color),
62 | plot.subtitle = element_text(family = title.font, size = subtitle.size, color = subtitle.color),
63 | # axis options
64 | axis.text = element_text(family = text.font, size = axis.text.size, color = axis.text.color),
65 | axis.title = element_text(family = title.font, size = axis.title.size, color = axis.title.color),
66 | # background/panel options
67 | plot.background = element_rect(color = NA, fill = "#7199E1"),
68 | panel.background = element_rect(color = NA, fill = "#7199E1"),
69 | panel.grid.major = element_line(color = "#fee8c8"),
70 | panel.grid.minor = element_line(color = "#fee8c8"),
71 | # legend options
72 | legend.text = element_text(family = legend.font, size = legend.text.size, color = legend.text.color),
73 | legend.title = element_text(family = legend.font, size = legend.title.size, color = legend.title.color),
74 | legend.position = legend.position,
75 | legend.key = element_rect(colour = "black", linetype = "solid", linewidth = 1.25),
76 | legend.background = element_rect(color = "black", fill = "#7199E1", linetype = "solid")
77 | )
78 |
79 | if (ticks == FALSE) {
80 | simpsons <- simpsons + theme(axis.ticks = element_blank(),
81 | axis.ticks.x = element_blank(),
82 | axis.ticks.y = element_blank())
83 | } else {
84 | simpsons <- simpsons + theme(axis.ticks = element_line(linewidth = 0.15, color = "white"),
85 | axis.ticks.x = element_line(linewidth = 0.15, color = "white"),
86 | axis.ticks.y = element_line(linewidth = 0.15, color = "white"),
87 | axis.ticks.length = grid::unit(4, "pt"))
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/tests/testthat/test-brooklyn99.R:
--------------------------------------------------------------------------------
1 | context("test-brooklyn99")
2 |
3 | expect_eqNe <- function(...) expect_equal(..., check.environment=FALSE)
4 | expect_equal_scales <- function(x, y, ...) {
5 | x <- as.list(x)
6 | y <- as.list(y)
7 | x$call <- y$call <- NULL
8 | expect_equal(x, y, ...)
9 | }
10 |
11 | test_that("theme_brooklyn99 works", {
12 | thm <- theme_brooklyn99()
13 | expect_s3_class(thm, "theme")
14 | ## font
15 | expect_equal(thm$text$family, "")
16 | expect_null(thm$plot.title$family)
17 | expect_null(thm$legend.title$family)
18 | expect_null(thm$legend.text$family)
19 | ## size
20 | expect_equal(thm$text$size, 14)
21 | expect_equal(thm$plot.title$size, 18)
22 | expect_equal(thm$plot.subtitle$size, 12)
23 | expect_equal(thm$axis.text$size, 12)
24 | expect_equal(thm$axis.title$size, 14)
25 | expect_equal(thm$legend.text$size, 9)
26 | expect_equal(thm$legend.title$size, 10)
27 | ## color
28 | expect_equal(thm$text$colour, "#F9FEFF")
29 | expect_equal(thm$plot.title$colour, "#F9FEFF")
30 | expect_equal(thm$plot.subtitle$colour, "#F9FEFF")
31 | expect_equal(thm$axis.text$colour, "#F9FEFF")
32 | expect_equal(thm$axis.title$colour, "#F9FEFF")
33 | expect_equal(thm$legend.text$colour, "#F9FEFF")
34 | expect_equal(thm$legend.title$colour, "#F9FEFF")
35 | expect_equal(thm$legend.position, "bottom")
36 |
37 | ## ticks == TRUE
38 | thm <- theme_brooklyn99(ticks = TRUE)
39 | expect_s3_class(thm, "theme")
40 | ## font
41 | expect_equal(thm$text$family, "")
42 | expect_null(thm$plot.title$family)
43 | expect_null(thm$legend.title$family)
44 | expect_null(thm$legend.text$family)
45 | ## size
46 | expect_equal(thm$text$size, 14)
47 | expect_equal(thm$plot.title$size, 18)
48 | expect_equal(thm$plot.subtitle$size, 12)
49 | expect_equal(thm$axis.text$size, 12)
50 | expect_equal(thm$axis.title$size, 14)
51 | expect_equal(thm$legend.text$size, 9)
52 | expect_equal(thm$legend.title$size, 10)
53 | ## ticks
54 | expect_equal(thm$axis.ticks$linewidth, 0.15)
55 | ## color
56 | expect_equal(thm$text$colour, "#F9FEFF")
57 | expect_equal(thm$plot.title$colour, "#F9FEFF")
58 | expect_equal(thm$plot.subtitle$colour, "#F9FEFF")
59 | expect_equal(thm$axis.text$colour, "#F9FEFF")
60 | expect_equal(thm$axis.title$colour, "#F9FEFF")
61 | expect_equal(thm$legend.text$colour, "#F9FEFF")
62 | expect_equal(thm$legend.title$colour, "#F9FEFF")
63 | expect_equal(thm$legend.position, "bottom")
64 | })
65 |
66 | test_that("brooklyn99_pal raises warning with large number, x > 10", {
67 | expect_warning(brooklyn99_pal()(11))
68 | expect_warning(brooklyn99_pal(reverse = TRUE)(11))
69 | expect_error(brooklyn99_pal(n = 12))
70 | })
71 |
72 | # test_that("scale_colour_brooklyn99/dark equals scale_color_brooklyn99/dark", {
73 | # expect_equal_scales(scale_color_brooklyn99(palette = "Regular"), scale_colour_brooklyn99(palette = "Regular"))
74 | # expect_equal_scales(scale_color_brooklyn99(palette = "Dark"), scale_colour_brooklyn99(palette = "Dark"))
75 | # })
76 |
77 | # test_that("scale_colour_brooklyn99/dark works", {
78 | # expect_is(scale_color_brooklyn99(palette = "Regular"), "ScaleDiscrete")
79 | # expect_is(scale_color_brooklyn99(palette = "Dark"), "ScaleDiscrete")
80 | # })
81 |
82 | # test_that("scale_fill_brooklyn99/dark works", {
83 | # expect_is(scale_fill_brooklyn99(palette = "Regular"), "ScaleDiscrete")
84 | # expect_is(scale_fill_brooklyn99(palette = "Dark"), "ScaleDiscrete")
85 | # })
86 |
87 | test_that("scale_color_brooklyn99 outputs correct colors", {
88 | expect_equal(brooklyn99_pal(palette = "Regular")(10),
89 | c( "#e7298a", ## hot pink
90 | "#72bcd4", ## lightblue
91 | "#e41a1c", ## red
92 | "#FCF40E", ## yellow
93 | "#49f149", ## light-green
94 | "#f16913", ## orange
95 | "#525252", ## grey
96 | "#F9FEFF", ## white
97 | "#000E33", ## dark navy
98 | "#000000" ## black
99 | ))
100 |
101 | expect_equal(brooklyn99_pal(palette = "Dark")(9),
102 | c( "#6CA9C3", ## light blue
103 | "#3A3533", ## dark gray
104 | "#000E33", ## dark navy
105 | "#800000", ## maroon
106 | "#CBCFD2", ## light gray
107 | "#175E78", ## turqoise
108 | "#DAA520", ## goldenrod
109 | "#174D79", ## dark teal
110 | "#000000" ## black
111 | ))
112 | })
113 |
--------------------------------------------------------------------------------
/R/palette_hilda.R:
--------------------------------------------------------------------------------
1 | ## Hilda palettes
2 |
3 | hilda_palette <- list(
4 | ## Hilda Day
5 | Day = c(
6 | "#F6E0D2", ## hlida white paper
7 | "#DFA398", ##
8 | "#9C6755", ##
9 | "#659794", ## hilda turqoise
10 | "#EA967C", ## hilda lightorange
11 | "#F5C98E", ## hilda beige
12 | "#D65B5A", ##
13 | "#586085" ##
14 | ),
15 | ## Hilda Dusk
16 | Dusk = c(
17 | "#EFCBCB", ##
18 | "#B47880", ##
19 | "#824B51", ##
20 | "#635761", ##
21 | "#AD616C", ##
22 | "#D1A391", ##
23 | "#7D3450", ##
24 | "#2B2D42" ##
25 | ),
26 | ## Hilda Night
27 | Night = c(
28 | "#E8E1E9", ##
29 | "#C0A5AA", ##
30 | "#4D3944", ##
31 | "#7083A4", ##
32 | "#B3A2B4", ##
33 | "#C9CCEA", ##
34 | "#3B3960", ##
35 | "#1E2142" ##
36 | )
37 | )
38 |
39 | #' @title Hilda palette
40 | #' @description Hilda palette
41 | #' @details Color set from Matt Shanks & `@ChevyRay`
42 | #' @inheritDotParams ggplot2::discrete_scale
43 | #' @param palette name of palette (Day, Dusk, Night), Default: "Day"
44 | #' @param n number of colors
45 | #' @param type discrete or continuous
46 | #' @param reverse reverse order, Default: FALSE
47 | #' @rdname hilda_pal
48 | #' @export
49 | #' @examples
50 | #' library(scales)
51 | #' show_col(hilda_pal(palette = "Dusk")(5))
52 | #' @importFrom scales manual_pal
53 | #' @importFrom grDevices colorRampPalette
54 |
55 | hilda_pal <- function(palette = "Day", n,
56 | type = c("discrete", "continuous"),
57 | reverse = FALSE){
58 | hilda <- hilda_palette[[palette]]
59 |
60 | if (reverse == TRUE) {
61 | hilda <- rev(hilda)
62 | }
63 |
64 | if (missing(n)) {
65 | n <- length(hilda)
66 | }
67 |
68 | type <- match.arg(type)
69 |
70 | if (type == "discrete" && n > length(hilda)) {
71 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(hilda), "!"))
72 | }
73 |
74 | hilda <- switch(type,
75 | continuous = grDevices::colorRampPalette(hilda)(n),
76 | discrete = hilda[1:n])
77 |
78 | hilda <- scales::manual_pal(hilda)
79 |
80 | return(hilda)
81 | }
82 |
83 | #' @title scale_color_hilda
84 | #' @rdname hilda_pal
85 | #' @export
86 | #' @examples
87 | #'
88 | #' library(ggplot2)
89 | #' ggplot(airquality, aes(x = Day, y = Temp,
90 | #' group = as.factor(Month), color = as.factor(Month))) +
91 | #' geom_point(size = 2.5) +
92 | #' scale_color_hilda(palette = "Day")
93 | #'
94 | #' ggplot(airquality, aes(x = Day, y = Temp,
95 | #' group = as.factor(Month), color = as.factor(Month))) +
96 | #' geom_point(size = 2.5) +
97 | #' scale_color_hilda(palette = "Night")
98 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
99 |
100 | scale_color_hilda <- function(palette = "Day", n, type = "discrete",
101 | reverse = FALSE, ...){
102 |
103 | if (type == "discrete") {
104 | ggplot2::discrete_scale("color", "hilda",
105 | hilda_pal(palette = palette, n = n, type = type,
106 | reverse = reverse), ...)
107 | } else { ## needs work...
108 | ggplot2::scale_color_gradientn(colors = hilda_pal(palette = palette, n = n, type = type,
109 | reverse = reverse)(8))
110 | }
111 | }
112 |
113 | #' @title scale_colour_hilda
114 | #' @rdname hilda_pal
115 | #' @export
116 | #' @examples
117 | #'
118 | #' ggplot(airquality, aes(x = Day, y = Temp,
119 | #' group = as.factor(Month), color = as.factor(Month))) +
120 | #' geom_point(size = 2.5) +
121 | #' scale_colour_hilda(palette = "Day")
122 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
123 |
124 | scale_colour_hilda <- scale_color_hilda
125 |
126 | #' @title scale_fill_hilda
127 | #' @rdname hilda_pal
128 | #' @export
129 | #' @examples
130 | #'
131 | #' ggplot(mpg, aes(displ)) +
132 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
133 | #' scale_fill_hilda(palette = "Night")
134 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
135 |
136 | scale_fill_hilda <- function(palette = "Day", n, type = "discrete",
137 | reverse = FALSE, ...){
138 | if (type == "discrete") {
139 | ggplot2::discrete_scale("fill", "hilda",
140 | hilda_pal(palette = palette, n = n, type = type,
141 | reverse = reverse), ...)
142 | } else { ## needs work...
143 | ggplot2::scale_fill_gradientn(colors = hilda_pal(palette = palette, n = n, type = type,
144 | reverse = reverse)(8))
145 | }
146 | }
147 |
--------------------------------------------------------------------------------
/inst/fonts/SpongeBob/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 Fredrick R Brennan
2 | with Reserved Font Name "SOME TIME LATER".
3 |
4 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
5 | This license is copied below, and is also available with a FAQ at:
6 | http://scripts.sil.org/OFL
7 |
8 |
9 | -----------------------------------------------------------
10 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11 | -----------------------------------------------------------
12 |
13 | PREAMBLE
14 | The goals of the Open Font License (OFL) are to stimulate worldwide
15 | development of collaborative font projects, to support the font creation
16 | efforts of academic and linguistic communities, and to provide a free and
17 | open framework in which fonts may be shared and improved in partnership
18 | with others.
19 |
20 | The OFL allows the licensed fonts to be used, studied, modified and
21 | redistributed freely as long as they are not sold by themselves. The
22 | fonts, including any derivative works, can be bundled, embedded,
23 | redistributed and/or sold with any software provided that any reserved
24 | names are not used by derivative works. The fonts and derivatives,
25 | however, cannot be released under any other type of license. The
26 | requirement for fonts to remain under this license does not apply
27 | to any document created using the fonts or their derivatives.
28 |
29 | DEFINITIONS
30 | "Font Software" refers to the set of files released by the Copyright
31 | Holder(s) under this license and clearly marked as such. This may
32 | include source files, build scripts and documentation.
33 |
34 | "Reserved Font Name" refers to any names specified as such after the
35 | copyright statement(s).
36 |
37 | "Original Version" refers to the collection of Font Software components as
38 | distributed by the Copyright Holder(s).
39 |
40 | "Modified Version" refers to any derivative made by adding to, deleting,
41 | or substituting -- in part or in whole -- any of the components of the
42 | Original Version, by changing formats or by porting the Font Software to a
43 | new environment.
44 |
45 | "Author" refers to any designer, engineer, programmer, technical
46 | writer or other person who contributed to the Font Software.
47 |
48 | PERMISSION & CONDITIONS
49 | Permission is hereby granted, free of charge, to any person obtaining
50 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
51 | redistribute, and sell modified and unmodified copies of the Font
52 | Software, subject to the following conditions:
53 |
54 | 1) Neither the Font Software nor any of its individual components,
55 | in Original or Modified Versions, may be sold by itself.
56 |
57 | 2) Original or Modified Versions of the Font Software may be bundled,
58 | redistributed and/or sold with any software, provided that each copy
59 | contains the above copyright notice and this license. These can be
60 | included either as stand-alone text files, human-readable headers or
61 | in the appropriate machine-readable metadata fields within text or
62 | binary files as long as those fields can be easily viewed by the user.
63 |
64 | 3) No Modified Version of the Font Software may use the Reserved Font
65 | Name(s) unless explicit written permission is granted by the corresponding
66 | Copyright Holder. This restriction only applies to the primary font name as
67 | presented to the users.
68 |
69 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70 | Software shall not be used to promote, endorse or advertise any
71 | Modified Version, except to acknowledge the contribution(s) of the
72 | Copyright Holder(s) and the Author(s) or with their explicit written
73 | permission.
74 |
75 | 5) The Font Software, modified or unmodified, in part or in whole,
76 | must be distributed entirely under this license, and must not be
77 | distributed under any other license. The requirement for fonts to
78 | remain under this license does not apply to any document created
79 | using the Font Software.
80 |
81 | TERMINATION
82 | This license becomes null and void if any of the above conditions are
83 | not met.
84 |
85 | DISCLAIMER
86 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94 | OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
/man/avatarTLA_pal.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/palette_thelastairbender.R
3 | \name{avatarTLA_pal}
4 | \alias{avatarTLA_pal}
5 | \alias{scale_color_avatarTLA}
6 | \alias{scale_colour_avatarTLA}
7 | \alias{scale_fill_avatarTLA}
8 | \title{Avatar: The Last Airbender palette (deprecated)}
9 | \usage{
10 | avatarTLA_pal(
11 | palette = "FireNation",
12 | n,
13 | type = c("discrete", "continuous"),
14 | reverse = FALSE
15 | )
16 |
17 | scale_color_avatarTLA(
18 | palette = "FireNation",
19 | n,
20 | type = "discrete",
21 | reverse = FALSE,
22 | ...
23 | )
24 |
25 | scale_colour_avatarTLA(
26 | palette = "FireNation",
27 | n,
28 | type = "discrete",
29 | reverse = FALSE,
30 | ...
31 | )
32 |
33 | scale_fill_avatarTLA(
34 | palette = "FireNation",
35 | n,
36 | type = "discrete",
37 | reverse = FALSE,
38 | ...
39 | )
40 | }
41 | \arguments{
42 | \item{palette}{name of palette (FireNation, EarthKingdom, WaterTribe, AirNomads),
43 | Default: "FireNation"}
44 |
45 | \item{n}{number of colors}
46 |
47 | \item{type}{discrete or continuous}
48 |
49 | \item{reverse}{reverse order, Default: FALSE}
50 |
51 | \item{...}{
52 | Arguments passed on to \code{\link[ggplot2:discrete_scale]{ggplot2::discrete_scale}}
53 | \describe{
54 | \item{\code{aesthetics}}{The names of the aesthetics that this scale works with.}
55 | \item{\code{scale_name}}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} The name of the scale
56 | that should be used for error messages associated with this scale.}
57 | \item{\code{name}}{The name of the scale. Used as the axis or legend title. If
58 | \code{waiver()}, the default, the name of the scale is taken from the first
59 | mapping used for that aesthetic. If \code{NULL}, the legend title will be
60 | omitted.}
61 | \item{\code{breaks}}{One of:
62 | \itemize{
63 | \item \code{NULL} for no breaks
64 | \item \code{waiver()} for the default breaks (the scale limits)
65 | \item A character vector of breaks
66 | \item A function that takes the limits as input and returns breaks
67 | as output. Also accepts rlang \link[rlang:as_function]{lambda} function
68 | notation.
69 | }}
70 | \item{\code{labels}}{One of:
71 | \itemize{
72 | \item \code{NULL} for no labels
73 | \item \code{waiver()} for the default labels computed by the
74 | transformation object
75 | \item A character vector giving labels (must be same length as \code{breaks})
76 | \item An expression vector (must be the same length as breaks). See ?plotmath for details.
77 | \item A function that takes the breaks as input and returns labels
78 | as output. Also accepts rlang \link[rlang:as_function]{lambda} function
79 | notation.
80 | }}
81 | \item{\code{limits}}{One of:
82 | \itemize{
83 | \item \code{NULL} to use the default scale values
84 | \item A character vector that defines possible values of the scale and their
85 | order
86 | \item A function that accepts the existing (automatic) values and returns
87 | new ones. Also accepts rlang \link[rlang:as_function]{lambda} function
88 | notation.
89 | }}
90 | \item{\code{expand}}{For position scales, a vector of range expansion constants used to add some
91 | padding around the data to ensure that they are placed some distance
92 | away from the axes. Use the convenience function \code{\link[ggplot2:expansion]{expansion()}}
93 | to generate the values for the \code{expand} argument. The defaults are to
94 | expand the scale by 5\% on each side for continuous variables, and by
95 | 0.6 units on each side for discrete variables.}
96 | \item{\code{na.translate}}{Unlike continuous scales, discrete scales can easily show
97 | missing values, and do so by default. If you want to remove missing values
98 | from a discrete scale, specify \code{na.translate = FALSE}.}
99 | \item{\code{na.value}}{If \code{na.translate = TRUE}, what aesthetic value should the
100 | missing values be displayed as? Does not apply to position scales
101 | where \code{NA} is always placed at the far right.}
102 | \item{\code{drop}}{Should unused factor levels be omitted from the scale?
103 | The default, \code{TRUE}, uses the levels that appear in the data;
104 | \code{FALSE} uses all the levels in the factor.}
105 | \item{\code{guide}}{A function used to create a guide or its name. See
106 | \code{\link[ggplot2:guides]{guides()}} for more information.}
107 | \item{\code{position}}{For position scales, The position of the axis.
108 | \code{left} or \code{right} for y axes, \code{top} or \code{bottom} for x axes.}
109 | \item{\code{call}}{The \code{call} used to construct the scale for reporting messages.}
110 | \item{\code{super}}{The super class to use for the constructed scale}
111 | }}
112 | }
113 | \description{
114 | Avatar: The Last Airbender palette
115 | }
116 |
--------------------------------------------------------------------------------
/R/palette_brooklyn99.R:
--------------------------------------------------------------------------------
1 | ## Brooklyn Nine-Nine palette
2 |
3 | brooklyn99_palette <- list(
4 | ## B99 regular palette ----
5 | Regular = c(
6 | "#e7298a", ## hot pink
7 | "#72bcd4", ## lightblue
8 | "#e41a1c", ## red
9 | "#FCF40E", ## yellow
10 | "#49f149", ## light-green
11 | "#f16913", ## orange
12 | "#525252", ## grey
13 | "#F9FEFF", ## white
14 | "#000E33", ## dark navy
15 | "#000000" ## black
16 | ),
17 | ## B99 dark palette ----
18 | Dark = c(
19 | "#6CA9C3", ## light blue
20 | "#3A3533", ## dark gray
21 | "#000E33", ## dark navy
22 | "#800000", ## maroon
23 | "#CBCFD2", ## light gray
24 | "#175E78", ## turqoise
25 | "#DAA520", ## goldenrod
26 | "#174D79", ## dark teal
27 | "#000000" ## black
28 | )
29 | )
30 |
31 | #' @title Brooklyn Nine Nine Color and Fill Scales
32 | #' @description Brooklyn Nine Nine Color and Fill Scales
33 | #' @details Colors that work well with the blue background!
34 | #' @inheritDotParams ggplot2::discrete_scale
35 | #' @param palette name of palette, Regular or Dark Default: "Regular"
36 | #' @param n number of colors
37 | #' @param type discrete or continuous
38 | #' @param reverse reverse order, Default: FALSE
39 | #' @rdname brooklyn99_pal
40 | #' @export
41 | #' @examples
42 | #' library(scales)
43 | #' show_col(brooklyn99_pal()(5))
44 | #' show_col(brooklyn99_pal(palette = "Dark")(5))
45 | #' @importFrom scales manual_pal
46 | #' @importFrom grDevices colorRampPalette
47 |
48 | brooklyn99_pal <- function(palette = "Regular", n = n,
49 | type = c("discrete", "continuous"),
50 | reverse = FALSE){
51 | brooklyn99 <- brooklyn99_palette[[palette]]
52 |
53 | if (reverse == TRUE) {
54 | brooklyn99 <- rev(brooklyn99)
55 | }
56 |
57 | if (missing(n)) {
58 | n <- length(brooklyn99)
59 | }
60 |
61 | type <- match.arg(type)
62 |
63 | if (type == "discrete" && n > length(brooklyn99)) {
64 | stop(paste0("Palette does not have ", n, " colors, maximum is ", length(brooklyn99), "!"))
65 | }
66 |
67 | brooklyn99 <- switch(type,
68 | continuous = grDevices::colorRampPalette(brooklyn99)(n),
69 | discrete = brooklyn99[1:n])
70 |
71 | brooklyn99 <- scales::manual_pal(brooklyn99)
72 |
73 | return(brooklyn99)
74 | }
75 |
76 | #' @title scale_color_brooklyn99
77 | #' @rdname brooklyn99_pal
78 | #' @export
79 | #' @examples
80 | #'
81 | #' library(ggplot2)
82 | #' ggplot(airquality, aes(x = Day, y = Temp,
83 | #' group = as.factor(Month), color = as.factor(Month))) +
84 | #' geom_point(size = 2.5) +
85 | #' scale_color_brooklyn99()
86 | #'
87 | #' ggplot(airquality, aes(x = Day, y = Temp,
88 | #' group = as.factor(Month), color = as.factor(Month))) +
89 | #' geom_point(size = 2.5) +
90 | #' scale_color_brooklyn99(palette = "Dark")
91 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
92 |
93 | scale_color_brooklyn99 <- function(palette = "Regular", n = n,
94 | type = "discrete",
95 | reverse = FALSE, ...){
96 | if (type == "discrete") {
97 | ggplot2::discrete_scale("color", "brooklyn99",
98 | brooklyn99_pal(palette = palette, n = n, type = type,
99 | reverse = reverse), ...)
100 | } else { ## needs work...
101 | ggplot2::scale_color_gradientn(colors = brooklyn99_pal(palette = palette, n = n, type = type,
102 | reverse = reverse)(8))
103 | }
104 | }
105 |
106 | #' @title scale_colour_brooklyn99
107 | #' @rdname brooklyn99_pal
108 | #' @export
109 | #' @examples
110 | #'
111 | #' ggplot(airquality, aes(x = Day, y = Temp,
112 | #' group = as.factor(Month), color = as.factor(Month))) +
113 | #' geom_point(size = 2.5) +
114 | #' scale_colour_brooklyn99(palette = "Dark")
115 | #' @importFrom ggplot2 discrete_scale scale_color_gradientn
116 |
117 | scale_colour_brooklyn99 <- scale_color_brooklyn99
118 |
119 | #' @title scale_fill_brooklyn99
120 | #' @rdname brooklyn99_pal
121 | #' @export
122 | #' @examples
123 | #'
124 | #' ggplot(mpg, aes(displ)) +
125 | #' geom_histogram(aes(fill = class), col = "black", size = 0.1) +
126 | #' scale_fill_brooklyn99()
127 | #' @importFrom ggplot2 discrete_scale scale_fill_gradientn
128 |
129 | scale_fill_brooklyn99 <- function(palette = "Regular", n = n,
130 | type = "discrete",
131 | reverse = FALSE, ...){
132 | if (type == "discrete") {
133 | ggplot2::discrete_scale("fill", "brooklyn99",
134 | brooklyn99_pal(palette = palette, n = n, type = type,
135 | reverse = reverse), ...)
136 | } else { ## needs work...
137 | ggplot2::scale_fill_gradientn(colors = brooklyn99_pal(palette = palette, n = n, type = type,
138 | reverse = reverse)(8))
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/man/bigHero6_pal.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/palette_bighero6.R
3 | \name{bigHero6_pal}
4 | \alias{bigHero6_pal}
5 | \alias{scale_color_bigHero6}
6 | \alias{scale_colour_bigHero6}
7 | \alias{scale_fill_bigHero6}
8 | \title{Big Hero 6 palette}
9 | \usage{
10 | bigHero6_pal(n, type = c("discrete", "continuous"), reverse = FALSE)
11 |
12 | scale_color_bigHero6(n, type = "discrete", reverse = FALSE, ...)
13 |
14 | scale_colour_bigHero6(n, type = "discrete", reverse = FALSE, ...)
15 |
16 | scale_fill_bigHero6(n, type = "discrete", reverse = FALSE, ...)
17 | }
18 | \arguments{
19 | \item{n}{number of colors}
20 |
21 | \item{type}{discrete or continuous}
22 |
23 | \item{reverse}{reverse order, Default: FALSE}
24 |
25 | \item{...}{
26 | Arguments passed on to \code{\link[ggplot2:discrete_scale]{ggplot2::discrete_scale}}
27 | \describe{
28 | \item{\code{aesthetics}}{The names of the aesthetics that this scale works with.}
29 | \item{\code{scale_name}}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} The name of the scale
30 | that should be used for error messages associated with this scale.}
31 | \item{\code{palette}}{A palette function that when called with a single integer
32 | argument (the number of levels in the scale) returns the values that
33 | they should take (e.g., \code{\link[scales:pal_hue]{scales::pal_hue()}}).}
34 | \item{\code{name}}{The name of the scale. Used as the axis or legend title. If
35 | \code{waiver()}, the default, the name of the scale is taken from the first
36 | mapping used for that aesthetic. If \code{NULL}, the legend title will be
37 | omitted.}
38 | \item{\code{breaks}}{One of:
39 | \itemize{
40 | \item \code{NULL} for no breaks
41 | \item \code{waiver()} for the default breaks (the scale limits)
42 | \item A character vector of breaks
43 | \item A function that takes the limits as input and returns breaks
44 | as output. Also accepts rlang \link[rlang:as_function]{lambda} function
45 | notation.
46 | }}
47 | \item{\code{labels}}{One of:
48 | \itemize{
49 | \item \code{NULL} for no labels
50 | \item \code{waiver()} for the default labels computed by the
51 | transformation object
52 | \item A character vector giving labels (must be same length as \code{breaks})
53 | \item An expression vector (must be the same length as breaks). See ?plotmath for details.
54 | \item A function that takes the breaks as input and returns labels
55 | as output. Also accepts rlang \link[rlang:as_function]{lambda} function
56 | notation.
57 | }}
58 | \item{\code{limits}}{One of:
59 | \itemize{
60 | \item \code{NULL} to use the default scale values
61 | \item A character vector that defines possible values of the scale and their
62 | order
63 | \item A function that accepts the existing (automatic) values and returns
64 | new ones. Also accepts rlang \link[rlang:as_function]{lambda} function
65 | notation.
66 | }}
67 | \item{\code{expand}}{For position scales, a vector of range expansion constants used to add some
68 | padding around the data to ensure that they are placed some distance
69 | away from the axes. Use the convenience function \code{\link[ggplot2:expansion]{expansion()}}
70 | to generate the values for the \code{expand} argument. The defaults are to
71 | expand the scale by 5\% on each side for continuous variables, and by
72 | 0.6 units on each side for discrete variables.}
73 | \item{\code{na.translate}}{Unlike continuous scales, discrete scales can easily show
74 | missing values, and do so by default. If you want to remove missing values
75 | from a discrete scale, specify \code{na.translate = FALSE}.}
76 | \item{\code{na.value}}{If \code{na.translate = TRUE}, what aesthetic value should the
77 | missing values be displayed as? Does not apply to position scales
78 | where \code{NA} is always placed at the far right.}
79 | \item{\code{drop}}{Should unused factor levels be omitted from the scale?
80 | The default, \code{TRUE}, uses the levels that appear in the data;
81 | \code{FALSE} uses all the levels in the factor.}
82 | \item{\code{guide}}{A function used to create a guide or its name. See
83 | \code{\link[ggplot2:guides]{guides()}} for more information.}
84 | \item{\code{position}}{For position scales, The position of the axis.
85 | \code{left} or \code{right} for y axes, \code{top} or \code{bottom} for x axes.}
86 | \item{\code{call}}{The \code{call} used to construct the scale for reporting messages.}
87 | \item{\code{super}}{The super class to use for the constructed scale}
88 | }}
89 | }
90 | \description{
91 | Big Hero 6 palette
92 | }
93 | \examples{
94 | library(scales)
95 | show_col(bigHero6_pal()(5))
96 |
97 | library(ggplot2)
98 | ggplot(airquality, aes(x = Day, y = Temp,
99 | group = as.factor(Month), color = as.factor(Month))) +
100 | geom_point(size = 2.5) +
101 | scale_color_bigHero6()
102 |
103 | ggplot(airquality, aes(x = Day, y = Temp,
104 | group = as.factor(Month), color = as.factor(Month))) +
105 | geom_point(size = 2.5) +
106 | scale_colour_bigHero6()
107 |
108 | ggplot(mpg, aes(displ)) +
109 | geom_histogram(aes(fill = class), col = "black", size = 0.1) +
110 | scale_fill_bigHero6()
111 | }
112 |
--------------------------------------------------------------------------------
/man/simpsons_pal.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/palette_simpsons.R
3 | \name{simpsons_pal}
4 | \alias{simpsons_pal}
5 | \alias{scale_color_simpsons}
6 | \alias{scale_colour_simpsons}
7 | \alias{scale_fill_simpsons}
8 | \title{The Simpsons palette}
9 | \usage{
10 | simpsons_pal(n, type = c("discrete", "continuous"), reverse = FALSE)
11 |
12 | scale_color_simpsons(n, type = "discrete", reverse = FALSE, ...)
13 |
14 | scale_colour_simpsons(n, type = "discrete", reverse = FALSE, ...)
15 |
16 | scale_fill_simpsons(n, type = "discrete", reverse = FALSE, ...)
17 | }
18 | \arguments{
19 | \item{n}{number of colors}
20 |
21 | \item{type}{discrete or continuous}
22 |
23 | \item{reverse}{reverse order, Default: FALSE}
24 |
25 | \item{...}{
26 | Arguments passed on to \code{\link[ggplot2:discrete_scale]{ggplot2::discrete_scale}}
27 | \describe{
28 | \item{\code{aesthetics}}{The names of the aesthetics that this scale works with.}
29 | \item{\code{scale_name}}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} The name of the scale
30 | that should be used for error messages associated with this scale.}
31 | \item{\code{palette}}{A palette function that when called with a single integer
32 | argument (the number of levels in the scale) returns the values that
33 | they should take (e.g., \code{\link[scales:pal_hue]{scales::pal_hue()}}).}
34 | \item{\code{name}}{The name of the scale. Used as the axis or legend title. If
35 | \code{waiver()}, the default, the name of the scale is taken from the first
36 | mapping used for that aesthetic. If \code{NULL}, the legend title will be
37 | omitted.}
38 | \item{\code{breaks}}{One of:
39 | \itemize{
40 | \item \code{NULL} for no breaks
41 | \item \code{waiver()} for the default breaks (the scale limits)
42 | \item A character vector of breaks
43 | \item A function that takes the limits as input and returns breaks
44 | as output. Also accepts rlang \link[rlang:as_function]{lambda} function
45 | notation.
46 | }}
47 | \item{\code{labels}}{One of:
48 | \itemize{
49 | \item \code{NULL} for no labels
50 | \item \code{waiver()} for the default labels computed by the
51 | transformation object
52 | \item A character vector giving labels (must be same length as \code{breaks})
53 | \item An expression vector (must be the same length as breaks). See ?plotmath for details.
54 | \item A function that takes the breaks as input and returns labels
55 | as output. Also accepts rlang \link[rlang:as_function]{lambda} function
56 | notation.
57 | }}
58 | \item{\code{limits}}{One of:
59 | \itemize{
60 | \item \code{NULL} to use the default scale values
61 | \item A character vector that defines possible values of the scale and their
62 | order
63 | \item A function that accepts the existing (automatic) values and returns
64 | new ones. Also accepts rlang \link[rlang:as_function]{lambda} function
65 | notation.
66 | }}
67 | \item{\code{expand}}{For position scales, a vector of range expansion constants used to add some
68 | padding around the data to ensure that they are placed some distance
69 | away from the axes. Use the convenience function \code{\link[ggplot2:expansion]{expansion()}}
70 | to generate the values for the \code{expand} argument. The defaults are to
71 | expand the scale by 5\% on each side for continuous variables, and by
72 | 0.6 units on each side for discrete variables.}
73 | \item{\code{na.translate}}{Unlike continuous scales, discrete scales can easily show
74 | missing values, and do so by default. If you want to remove missing values
75 | from a discrete scale, specify \code{na.translate = FALSE}.}
76 | \item{\code{na.value}}{If \code{na.translate = TRUE}, what aesthetic value should the
77 | missing values be displayed as? Does not apply to position scales
78 | where \code{NA} is always placed at the far right.}
79 | \item{\code{drop}}{Should unused factor levels be omitted from the scale?
80 | The default, \code{TRUE}, uses the levels that appear in the data;
81 | \code{FALSE} uses all the levels in the factor.}
82 | \item{\code{guide}}{A function used to create a guide or its name. See
83 | \code{\link[ggplot2:guides]{guides()}} for more information.}
84 | \item{\code{position}}{For position scales, The position of the axis.
85 | \code{left} or \code{right} for y axes, \code{top} or \code{bottom} for x axes.}
86 | \item{\code{call}}{The \code{call} used to construct the scale for reporting messages.}
87 | \item{\code{super}}{The super class to use for the constructed scale}
88 | }}
89 | }
90 | \description{
91 | The Simpsons palette
92 | }
93 | \examples{
94 | library(scales)
95 | show_col(simpsons_pal()(5))
96 |
97 | library(ggplot2)
98 | ggplot(airquality, aes(x = Day, y = Temp,
99 | group = as.factor(Month), color = as.factor(Month))) +
100 | geom_point(size = 2.5) +
101 | scale_color_simpsons()
102 |
103 | ggplot(airquality, aes(x = Day, y = Temp,
104 | group = as.factor(Month), color = as.factor(Month))) +
105 | geom_point(size = 2.5) +
106 | scale_color_simpsons()
107 |
108 | ggplot(mpg, aes(displ)) +
109 | geom_histogram(aes(fill = class), col = "black", size = 0.1) +
110 | scale_fill_simpsons()
111 | }
112 |
--------------------------------------------------------------------------------