| nhl.colors | R Documentation |
Returns a named character vector of hex colors for an NHL team. Teams cover
the 2026-27 NHL season, plus the Arizona Coyotes.
Call colorr.teams("nhl") for the full list of team names.
nhl.colors(
set = c("avalanche", "blackhawks", "blue_jackets", "blues", "bruins", "canadiens",
"canucks", "capitals", "coyotes", "devils", "ducks", "flames", "flyers",
"golden_knights", "hurricanes", "islanders", "jets", "kings", "kraken", "lightning",
"maple_leafs", "oilers", "panthers", "penguins", "predators", "rangers", "red_wings",
"sabres", "senators", "sharks", "stars", "utah", "wild"),
legacy = FALSE
)
set |
Character string naming an NHL team. |
legacy |
Logical. If |
Named character vector of hex color strings.
Charles Crabtree charles.crabtree@monash.edu
colorr.teams to list teams, scale_fill_nhl for the
ggplot2 scales.
# Anaheim Ducks colors
pal <- nhl.colors("ducks")
pal
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)
# Utah Mammoth colors
nhl.colors("utah")
# the palette that shipped with colorr 1.0.1
nhl.colors("ducks", legacy = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.