Skip to content

obianalysts-umich/OBI.color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBI.color

OBI Style guidance document is HERE

The goal of OBI.color is to put OBI style colors in one place, so we don’t have to use hex to define colors.

The OBI style colors are based on OBI Style Guide

Installation

Install the development version directly from GitHub:

# install.packages("devtools")
devtools::install_github("obianalysts-umich/OBI.color")

BCBS Requirements

Reports that we share with OBI sites need to have BCBSM required language and BCBS logo.

Please see this SOP for reference.

Report CSS file

A CSS file that can be used to style reports is available HERE.

Manual Style

A template for creating interpretation manuals or other documents to be posted on the OBI website is available HERE.

Naming convention

Color names are based on this document.

  • All three primary colors are named as prim_, and are combines in primary_colors_4()
  • All Five primary colors are named as second_. Five secondary colors are in secondary_colors_5()

Example: Use 4 primary colors

library(OBI.color)
library(tidyverse)
#> ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
#> ✔ dplyr     1.1.4     ✔ readr     2.1.5
#> ✔ forcats   1.0.0     ✔ stringr   1.5.1
#> ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
#> ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
#> ✔ purrr     1.0.2     
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag()    masks stats::lag()
#> ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
ggplot(
  data = iris,
  aes(x = Sepal.Length, y = Petal.Length, color = Species)
) +
  geom_point() +
  # use OBI colors
  scale_color_manual(values = primary_colors_4()) +
  theme_minimal()

Color Palette

This is a basic example which shows you how to solve a common problem:

Primary Colors

4 colors : “#1e3668” “#3277b0” “#811e4d” “#009395”

p <- primary_colors_4(show_color = T)

Secondary colors

5 colors : “#f8b434” “#b64083” “#40144c” “#60b0e2” “#085068”

s <- secondary_colors_5(show_color = T)

all colors

7 colors : “#1e3668” “#3277b0” “#811e4d” “#009395” “#f8b434” “#b64083” “#40144c” “#60b0e2” “#085068”

t <- all_colors(show_color = T)

Releases

No releases published

Packages

No packages published