Last active
October 12, 2021 20:29
-
-
Save benjamin-chan/2a72f2d0bfbf514d950e08fbf2addbd9 to your computer and use it in GitHub Desktop.
OHA color palette
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pal <- c(rgb( 0, 85, 149, maxColorValue = 255), # Medium Electric Blue "#005595" | |
| rgb(236, 137, 2, maxColorValue = 255), # Tangerine "#EC8902" | |
| rgb(125, 168, 48, maxColorValue = 255), # Green (RYB) "#7DA830" | |
| rgb( 0, 136, 184, maxColorValue = 255), # Blue (NCS) "#0088B8" | |
| rgb( 83, 109, 96, maxColorValue = 255), # Stormcloud "#536D60" | |
| rgb(160, 28, 63, maxColorValue = 255), # Deep Carmine "#A01C3F" | |
| rgb( 30, 25, 77, maxColorValue = 255), # Space Cadet "#1E194D" | |
| rgb(100, 100, 100, maxColorValue = 255), # Granite Gray "#646464" | |
| rgb(127, 127, 127, maxColorValue = 255), # Gray (HTML/CSS Gray) "#7f7f7f" | |
| rgb(166, 166, 166, maxColorValue = 255), # Quick Silver "#A6A6A6" | |
| rgb(191, 191, 191, maxColorValue = 255), # Argent "#BFBFBF" | |
| rgb(231, 231, 231, maxColorValue = 255), # Platinum "#E7E7E7" | |
| rgb(242, 242, 242, maxColorValue = 255)) # Anti-Flash White "#F2F2F2" | |
| # Color names from https://www.color-name.com | |
| # EXAMPLE | |
| devtools::source_gist("https://gist.github.com/benjamin-chan/2a72f2d0bfbf514d950e08fbf2addbd9") | |
| pal | |
| library(ggplot2) | |
| df <- expand.grid(x = seq(1, 100), type = LETTERS[1:6]) | |
| df <- cbind(df, y = rnorm(nrow(df))) | |
| ggplot(data = df, aes(x = y, color = type, fill = type)) + | |
| geom_density() + | |
| scale_color_manual(values = pal) + | |
| scale_fill_manual(values = pal) + | |
| facet_wrap(~ type) | |
| # SOURCE | |
| # https://dhsoha.sharepoint.com/:b:/r/teams/Hub-OHA-HPA/Shared%20Documents/Comms%20Resources/HPA-Data-Viz-Guide.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment