NatParksPalettes Save

Color palette package inspired by National Parks

Project README

National Parks Palettes

Color palettes inspired by National Parks.

CRAN Version CRAN Downloads

NatParksPalettes is comprised of 30 color palettes, including 12 colorblind-friendly palettes, based on photos of national parks from around the world. Compatible with {ggplot2} in R and QGIS.

For more National Parks inspired palettes, see the nationalparkcolors package. Palettes converted to .xml with Convert R palette to QGIS Style XML.

Content

Installation

Palettes

Functions

Colorblind Checking

Install Package

R

NatParksPalettes is on CRAN and able to be downloaded in R. It can still be installed through GitHub.

# Install through CRAN
install.packages("NatParksPalettes")

# Install through GitHub
install.packages("devtools")
devtools::install_github("kevinsblake/NatParksPalettes")

QGIS

From QGIS, open Settings Style Manager... expand the Import/Export drop-down menu and select Import Item(s).... Expand the Import from drop-down menu, select URL, and paste this URL:

https://raw.githubusercontent.com/kevinsblake/NatParksPalettes/main/GIS/NatParksPalettes.xml

Then select Fetch Items. Choose individual palettes or select Select All then select Import.

Usage

library(NatParksPalettes)

names(NatParksPalettes)
 [1] "Acadia"      "Arches"      "Arches2"     "Banff"       "BryceCanyon" "CapitolReef" "Charmonix"   "CraterLake"  "Cuyahoga"    "DeathValley" "Denali"     
[12] "Everglades"  "Glacier"     "GrandCanyon" "Halekala"    "IguazuFalls" "KingsCanyon" "LakeNakuru"  "Olympic"     "Redwood"     "RockyMtn"    "Saguaro"    
[23] "SmokyMtns"   "SouthDowns"  "Torres"      "Triglav"     "WindCave"    "Volcanoes"   "Yellowstone" "Yosemite"

Palettes

All Palettes

AllPals

Acadia NP, USA

Acadia

  • Bass Harbor Head Lighthouse on Mount Desert Island, Jon Bilous, Dreamstime, LINK
  • Colorblind-Friendly

Arches NP, USA

Arches

  • Delicate Arch with the La Sal Mountains in the background, Depositphotos, LINK
  • Colorblind-Friendly

Arches NP (2), USA

Arches2

  • Delicate Arch evening, Lavish Singal LINK
  • Colorblind-Friendly

Banff NP, Canada

Banff

  • Moraine Lake, Andy Holmes, LINK

Bryce Canyon NP, USA

BryceCanyon

  • Sunrise Point, LINK
  • Colorblind-Friendly

Capitol Reef NP, USA

CapitolReef

  • Chinle Formation, NPS, LINK
  • Colorblind-Friendly

Charmonix-Mont-Blanc NP, France

Charmonix

  • Aiguille du Midi, LINK

Crater Lake NP, USA

CraterLake

  • Crater Lake, NPS, LINK

Cuyahoga NP, USA

Cuyahoga

  • Buttermilk Falls, Benjamin Lehman / Flickr, LINK
  • Colorblind-Friendly

Death Valley NP, USA

DeathValley

  • Mesquite Flat Sand Dunes, LINK
  • Colorblind-Friendly

Denali NP, USA

Denali

  • Getty Images, LINK

Everglades NP, USA

Everglades

  • Aerial view, Getty Images, LINK

Glacier NP, USA

Glacier

  • Inside an ice cave with blue ice, Kevin Haney, NPS, LINK
  • Colorblind-Friendly

Grand Canyon NP, USA

GrandCanyon

  • Toroweap point at sunrise, Sumiko Scott, Shutterstock, LINK

Halekala NP, USA

Halekala

  • Pele's Paint Pot, Jonathan Irish, National Geographic, LINK
  • Colorblind-Friendly

Iguazu Falls NP, Argentina & Brazil

IguazuFalls

  • Iguazu Falls, LINK

Kings Canyon NP, USA

KingsCanyon

  • Karla Rivera, LINK
  • Colorblind-Friendly

Lake Nakuru NP, Kenya

LakeNakuru

  • Flamingos in Lake Nakuu, LINK

Olympic NP, USA

Olympic

  • Sol Duc, Scott Malagold, LINK

Redwood NP, USA

Redwood

  • Boy Scout Tree Trail, Lana Law, LINK

Rocky Mountain NP, USA

RockyMtn

  • Bear Lake, Estes Park, LINK

Saguaro NP, USA

Saguaro


Smoky Mountains NP, USA

SmokyMtns

  • Little River Road heading to Cades Cove, Norman Lathrop, LINK

South Downs NP, UK

SouthDowns

  • Seven Sisters, John Harper/Corbis, LINK

Torres del Paine NP, Chile

Torres

  • Cordillera Paine mountains, LINK

Triglav NP, Slovenia

Triglav

  • Triglav mountain, LINK
  • Colorblind-Friendly

Wind Cave NP, USA

WindCave

  • Cratework formation, NPS, LINK
  • Colorblind-Friendly

Hawai'i Volcanoes NP, USA

Volcanoes

  • Eruption, NPS Photo/Janice Wei, LINK
  • Colorblind-Friendly

Yellowstone NP, USA

Yellowstone

  • Grand Prismatic Spring at Yellowstone’s Midway Geyser Basin, Grant Ordelheide, LINK

Yosemite NP, USA

Yosemite

  • Yosemite Valley, Leanne Harjer, LINK

Functions

You can retrieve palettes using various methods listed below.
natparks.pals(name="DeathValley",n=7,type="discrete")

Ex1

natparks.pals("Yellowstone", 5)

Ex2

natparks.pals("Olympic")

Ex3.png)

natparks.pals("Glacier",n=15,type="continuous")

Ex4

natparks.pals("Arches",n=100)

Ex5

ggplot2 Examples

Here are also some ways you can incorporate this package into {ggplot2}

ggplot(data=iris, aes(x=Species, y=Petal.Length, fill=Species)) +
  geom_violin() +
  scale_fill_manual(values=natparks.pals("Yellowstone", 3))

Ex6

ggplot(data=iris, aes(x=Sepal.Length, y=Sepal.Width, color=Species)) +
  geom_point(size=2) +
  scale_color_manual(values=natparks.pals("Banff", 3))

Ex7

ggplot(data=iris, aes(x=Species, y=Sepal.Width, color=Sepal.Width)) +
  geom_point(size=3) +
  scale_color_gradientn(colors=natparks.pals("Arches2"))

Ex8

Colorblind Friendly checking

The colorblind friendliness of all palettes have been checked using colorblindcheck. Those with [min_dist] >10 for all color vision deficiencies - deuteranopia, protanopia, and tritanopia - are considered colorblind friendly. You can list the colorblind-friendly palettes with the following code:

NatParksPalettes::colorblind_palettes
[1] "Acadia"      "Arches"      "Arches2"     "DeathValley" "Glacier"     "KingsCanyon"

You can also check if a specific palette is colorblind friendly using the function provided

NatParksPalettes::colorblind.friendly("DeathValley")
[1] TRUE
Open Source Agenda is not affiliated with "NatParksPalettes" Project. README Source: kevinsblake/NatParksPalettes
Stars
222
Open Issues
0
Last Commit
4 months ago

Open Source Agenda Badge

Open Source Agenda Rating