Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CoryMcCartan committed Feb 23, 2021
1 parent 13737ec commit 9165993
Show file tree
Hide file tree
Showing 36 changed files with 35 additions and 48 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: wacolors
Title: Colorblind-friendly Palettes from Washington State
Version: 0.1.0
Version: 0.1.1
Authors@R:
person("Cory", "McCartan", role = c("aut", "cre"),
email = "[email protected]")
Description: Color palettes taken from the landscapes and cities of Washington
state. Each color was extracted from a photograph, with minor alterations
made to improve balance. The palettes were evaluated by the color-blind
author to ensure colors are distinguishable, but some palettes risk more
confusion than others.
confusion than others, especially at small scales.
Depends:
R (>= 3.0)
Imports:
Expand Down
43 changes: 22 additions & 21 deletions R/colors.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,59 @@
#'
#' @export
wacolors = list(
rainier = c(ground="#6D9537", lake="#364B6F", rock="#A1A2B7", trees="#2A4E45",
lodge="#7F4E28", fall_bush="#E59A20", glacier="#D2D8E8"),
rainier = c(ground="#6D9537", lake="#364B6F", rock="#9C9DB0", trees="#2A4E45",
lodge="#7F4E28", fall_bush="#E59A20", glacier="#D4D8E2"),
rainier_meadow = c(ground="#6D9337", ragwort="#EECE12", paintbrush="#DE327D",
penstemon="#7754ED", western_anemone="#DCD5A8",
trees="#2A4B41", bog_orchid="#C1B062"),
larch = c(larch="#DEA141", shrub="#313D23", rock="#8698A4",
larch = c(larch="#D7A141", shrub="#313D23", rock="#8698A4",
moss="#7F6A3D", dirt="#C9AB85", forest="#718C7D"),
forest = c(shadows="#183314", trees="#719133", stream="#0D2633", dirt="#5a3f2f"),
forest = c(shadows="#183314", trees="#719133", stream="#0D2633", dirt="#6C3F2E"),
understory = c(shadows="#183314", trees="#425426",
moss="#60652B", tips="#719133"),
seattle_night = c(columbia="#1A243C", dock_lights="#CA893D", ferry="#7393C1",
seafirst="#0B0912", pike_clock="#F1383C", sky="#0C3E84",
moss="#60692B", tips="#739733"),
seattle_night = c(columbia="#1F283D", dock_lights="#CDA93D", ferry="#7393C1",
pike_clock="#F1383C", sky="#0C3E84", seafirst="#0B0912",
smith="#C3B497", puddle="#372937"),
seattle_fall = c("#5C5F0A", "#C7AA1F", "#C0664A", "#69798B", "#709FC3"),
pike_place = c(neon="#F85051", lemons="#F3B866",
pike_place = c(neon="#F55051", lemons="#F3B862",
broccoli="#698423", seafood_sign="#2480F0", floor="#725334"),
fort_worden = c(sea="#617493", shrub="#313E18", lighthouse="#A7B5C9",
rust="#8D5F12", gravel="#5E635F"),
chambers_bay = c("#314008", "#7E92A6", "#7C5E31", "#11425C", "#E2EBF4"),
stuart = c(rock="#435864", shore="#B9AA81", lupin="#564086",
grass="#9F9F36", forest="#63664F", sky="#5688F8"),
fort_worden = c(sea="#616885", shrub="#313E18", lighthouse="#A7B5C9",
rust="#8E6418", gravel="#5E635F"),
chambers_bay = c("#314008", "#7E92A6", "#7C7E31", "#11425C", "#E2EBF4"),
stuart = c(rock="#435054", shore="#B9AA81", lupin="#564086",
grass="#9F9F36", forest="#5F6F4F", sky="#5688F8"),
sound_sunset = c("#41527A", "#5C7293", "#7389A6", "#90929C",
"#B09982", "#DDAD7A", "#F3E8A0"),
"#B09982", "#DDAD7A", "#F6E297"),
washington_pass = c(trees="#2C5843", stone="#416194", tips="#9FAA2A",
road="#729AB4", sunbreak="#D9D1AE", stump="#515467"),
winthrop = c("#765E36", "#67747C", "#BF9A6E", "#3D4B27"),
forest_fire = c("#3A2620", "#7A4424", "#CD5A0D", "#FE8B00", "#FFD874"),
ross_lake = c(water="#3992C7", forest="#496E36", rock="#BFA580",
reflection="#183D26", mountain="#20476F", canoe="#A63634"),
reflection="#183D26", mountain="#20476F", canoe="#AF5256"),
winter_mountain = c("#4D6E9F", "#9CB3DC", "#D0C5D1", "#F3ECE2", "#F1F1F1"),
library = c(diamonds="#727E8A", fourthfloor="#F12D32",
carpet="#CF967D", shadows="#3B3128"),
ferries = c(deck="#2C303B", water="#3A4A6B", trim="#2A745D",
windows="#80948D", sunset="#F3E5A9"),
volcano = c(rock="#30353F", ash="#9F9B93", glacier="#D9E1EC"),
locks = c(salmon1="#384230", water="#6FB866", salmon2="#ABCF9F"),
locks = c(scale="#384230", water="#6FB866", fin="#ABCF9F"),
deception_pass = c(water="#43667A", rock="#D7BF97",
trees="#687238", depths="#0E1C25"),
scrubland = c(scrub="#827E4F", rock="#645F54", fire="#BAA036", sky="#66A3E4"),
scrubland = c(scrub="#827E4F", rock="#645F54", fire="#CAB036", sky="#66A3E4"),
palouse = c("#B8990F", "#856A82", "#A59271", "#6994F7"),
grand_coulee = c(columbia="#0B3D60", hills="#DCBA8D", dam="#5F7B86",
resevoir="#53A0CF", brush="#F0AE3F"),
chihuly = c("#1E1A66", "#99150B", "#EAB926", "#77B6F3"),
plane_view = c("#161F47", "#134575", "#4A72B8", "#99C6F7", "#DCE8F8"),
UW = c(purple="#4B2E83", suzallo="#C3A46D", cherry="#E1B2B8",
brick="#664333", suzallo_light="#D6B844", stone="#92847A"),
UW = c(purple="#4B2E83", gold="#B7A57A", cherry="#E1B2B8",
brick="#664333", suzzallo="#C6A844", stone="#92847A"),
flag = c(green="#007D50", yellow="#F7DB03", blue="#5EBFDE", tan="#FBDBC9"),
tartan = c(green="#004500", gold="#B2B202", darkblue="#191959",
red="#800000", medblue="#014098")
)

cont_pal = c("sound_sunset", "understory", "winter_mountain",
"ferries", "volcano", "locks", "plane_view")
cont_pal = c("sound_sunset", "understory", "winter_mountain", "ferries",
"forest_fire", "volcano", "locks", "plane_view")

#' Washington State Color Palette Generator
#'
Expand Down
14 changes: 0 additions & 14 deletions R/scales.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,3 @@ scale_colour_wa_b = scale_color_wa_d
#' @rdname scale_wa
#' @export
scale_fill_wa_b = scale_fill_wa_d

if (F) {
ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(color = factor(cyl), size=hp)) +
scale_color_wa_d()

ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(colour = hp)) +
scale_color_wa_c("seattle_night", which=c("seafirst", "pike_clock"))

ggplot(diamonds) +
geom_bar(aes(x = cut, fill = clarity)) +
scale_fill_wa_d(wacolors$sound_sunset, reverse=TRUE)
}
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ taken from the landscapes and cities of Washington state. Each color was
extracted from a photograph, with minor alterations made to improve balance
and desaturability. The palettes were evaluated by the color-blind author to
ensure colors are distinguishable, but some palettes risk more confusion than
others.
others, especially at small scales.

## Installation
<!-- You can install the released version of wacolors from [CRAN](https://CRAN.R-project.org) with: -->
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

![Mt. Rainier](cover.jpg)

The `wacolor` package contains 29 color palettes taken from the
The `wacolor` package contains 30 color palettes taken from the
landscapes and cities of Washington state. Each color was extracted from
a photograph, with minor alterations made to improve balance and
desaturability. The palettes were evaluated by the color-blind author to
ensure colors are distinguishable, but some palettes risk more confusion
than others.
than others, especially at small scales.

## Installation

Expand All @@ -41,16 +41,16 @@ names(wacolors)
#> [1] "rainier" "rainier_meadow" "larch" "forest"
#> [5] "understory" "seattle_night" "seattle_fall" "pike_place"
#> [9] "fort_worden" "chambers_bay" "stuart" "sound_sunset"
#> [13] "washington_pass" "winthrop" "ross_lake" "winter_mountain"
#> [17] "library" "ferries" "volcano" "locks"
#> [21] "deception_pass" "scrubland" "palouse" "grand_coulee"
#> [25] "chihuly" "plane_view" "UW" "flag"
#> [29] "tartan"
#> [13] "washington_pass" "winthrop" "forest_fire" "ross_lake"
#> [17] "winter_mountain" "library" "ferries" "volcano"
#> [21] "locks" "deception_pass" "scrubland" "palouse"
#> [25] "grand_coulee" "chihuly" "plane_view" "UW"
#> [29] "flag" "tartan"

# See one palette
wacolors$rainier
#> ground lake rock trees lodge fall_bush glacier
#> "#6D9537" "#364B6F" "#A1A2B7" "#2A4E45" "#7F4E28" "#E59A20" "#D2D8E8"
#> "#6D9537" "#364B6F" "#9C9DB0" "#2A4E45" "#7F4E28" "#E59A20" "#D4D8E2"
```

The package comes with `ggplot2`-compatible scales which are easy to
Expand Down Expand Up @@ -100,7 +100,7 @@ code will be loaded, ready to copy, at the console prompt.
pal_vector("sound_sunset", 15)
#> PAL_SOUND_SUNSET = c("#41527A", "#4C5F84", "#586D8F", "#627898", "#6C82A0",
#> "#778AA4", "#838EA0", "#90929C", "#9D9490", "#AB9885",
#> "#BC9E7F", "#D0A77C", "#E0B57F", "#E9CE8F", "#F3E8A0")
#> "#BC9E7F", "#D0A77C", "#E0B47E", "#EBCB8A", "#F6E297")

pal_functions("locks")
#> scale_color_locks_d = function(...) {
Expand Down Expand Up @@ -136,4 +136,4 @@ pal_functions("locks")

### All Palettes

![](man/figures/README-disc-palettes-1.png)<!-- -->![](man/figures/README-disc-palettes-2.png)<!-- -->![](man/figures/README-disc-palettes-3.png)<!-- -->![](man/figures/README-disc-palettes-4.png)<!-- -->![](man/figures/README-disc-palettes-5.png)<!-- -->![](man/figures/README-disc-palettes-6.png)<!-- -->![](man/figures/README-disc-palettes-7.png)<!-- -->![](man/figures/README-disc-palettes-8.png)<!-- -->![](man/figures/README-disc-palettes-9.png)<!-- -->![](man/figures/README-disc-palettes-10.png)<!-- -->![](man/figures/README-disc-palettes-11.png)<!-- -->![](man/figures/README-disc-palettes-12.png)<!-- -->![](man/figures/README-disc-palettes-13.png)<!-- -->![](man/figures/README-disc-palettes-14.png)<!-- -->![](man/figures/README-disc-palettes-15.png)<!-- -->![](man/figures/README-disc-palettes-16.png)<!-- -->![](man/figures/README-disc-palettes-17.png)<!-- -->![](man/figures/README-disc-palettes-18.png)<!-- -->![](man/figures/README-disc-palettes-19.png)<!-- -->![](man/figures/README-disc-palettes-20.png)<!-- -->![](man/figures/README-disc-palettes-21.png)<!-- -->![](man/figures/README-disc-palettes-22.png)<!-- -->![](man/figures/README-disc-palettes-23.png)<!-- -->![](man/figures/README-disc-palettes-24.png)<!-- -->![](man/figures/README-disc-palettes-25.png)<!-- -->![](man/figures/README-disc-palettes-26.png)<!-- -->![](man/figures/README-disc-palettes-27.png)<!-- -->![](man/figures/README-disc-palettes-28.png)<!-- -->![](man/figures/README-disc-palettes-29.png)<!-- -->
![](man/figures/README-disc-palettes-1.png)<!-- -->![](man/figures/README-disc-palettes-2.png)<!-- -->![](man/figures/README-disc-palettes-3.png)<!-- -->![](man/figures/README-disc-palettes-4.png)<!-- -->![](man/figures/README-disc-palettes-5.png)<!-- -->![](man/figures/README-disc-palettes-6.png)<!-- -->![](man/figures/README-disc-palettes-7.png)<!-- -->![](man/figures/README-disc-palettes-8.png)<!-- -->![](man/figures/README-disc-palettes-9.png)<!-- -->![](man/figures/README-disc-palettes-10.png)<!-- -->![](man/figures/README-disc-palettes-11.png)<!-- -->![](man/figures/README-disc-palettes-12.png)<!-- -->![](man/figures/README-disc-palettes-13.png)<!-- -->![](man/figures/README-disc-palettes-14.png)<!-- -->![](man/figures/README-disc-palettes-15.png)<!-- -->![](man/figures/README-disc-palettes-16.png)<!-- -->![](man/figures/README-disc-palettes-17.png)<!-- -->![](man/figures/README-disc-palettes-18.png)<!-- -->![](man/figures/README-disc-palettes-19.png)<!-- -->![](man/figures/README-disc-palettes-20.png)<!-- -->![](man/figures/README-disc-palettes-21.png)<!-- -->![](man/figures/README-disc-palettes-22.png)<!-- -->![](man/figures/README-disc-palettes-23.png)<!-- -->![](man/figures/README-disc-palettes-24.png)<!-- -->![](man/figures/README-disc-palettes-25.png)<!-- -->![](man/figures/README-disc-palettes-26.png)<!-- -->![](man/figures/README-disc-palettes-27.png)<!-- -->![](man/figures/README-disc-palettes-28.png)<!-- -->![](man/figures/README-disc-palettes-29.png)<!-- -->![](man/figures/README-disc-palettes-30.png)<!-- -->
Binary file modified man/figures/README-cont-palettes-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-cont-palettes-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-cont-palettes-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-disc-palettes-30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-disc-palettes-5.png
Binary file modified man/figures/README-disc-palettes-6.png
Binary file modified man/figures/README-disc-palettes-8.png
Binary file modified man/figures/README-disc-palettes-9.png
Binary file modified man/figures/README-ggplot-1.png
Binary file modified man/figures/README-ggplot-2.png

0 comments on commit 9165993

Please sign in to comment.