| Type: | Package |
| Title: | Color Palettes for Soccer, MLB, NBA, WNBA, NHL, and NFL Teams |
| Version: | 1.1.0 |
| Description: | Current-season color palettes for soccer clubs in the English Premier League ('EPL'), 'LaLiga', 'Serie A', the 'Bundesliga', 'Ligue 1' and Major League Soccer ('MLS'), and for Major League Baseball ('MLB'), National Basketball Association ('NBA'), Women's National Basketball Association ('WNBA'), National Hockey League ('NHL') and National Football League ('NFL') teams. Palettes are returned as named character vectors of hex colors, and as 'ggplot2' colour and fill scales. The palettes shipped in earlier versions of the package remain available so that older figures stay reproducible. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Depends: | R (≥ 3.6.0) |
| Imports: | ggplot2 (≥ 3.5.0), grDevices |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| RoxygenNote: | 7.3.3 |
| URL: | https://github.com/lobsterbush/colorr |
| BugReports: | https://github.com/lobsterbush/colorr/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-08-22 12:10:20 UTC; f00421k |
| Author: | Charles Crabtree [aut, cre] |
| Maintainer: | Charles Crabtree <charles.crabtree@monash.edu> |
| Repository: | CRAN |
| Date/Publication: | 2026-08-22 15:10:39 UTC |
colorr: color palettes for sports teams
Description
colorr provides color palettes for professional sports teams as named character vectors of hex colors, and as ggplot2 colour and fill scales.
Details
Palette functions, one per league:
epl.colors, soccer.colors, mlb.colors,
nba.colors, wnba.colors, nfl.colors and
nhl.colors. colorr.colors does the same job when the
league is itself a variable.
To find out what is available, use colorr.leagues and
colorr.teams.
For ggplot2, every league has scale_colour_*, scale_color_* and
scale_fill_* constructors, e.g. scale_fill_nba. They are built
on colorr.pal, which converts any team palette into a palette function.
Every palette function takes legacy = TRUE, which returns the palette that
shipped with colorr 1.0.1 rather than the current-season one.
Author(s)
Maintainer: Charles Crabtree charles.crabtree@monash.edu
See Also
Useful links:
Team colors from any league
Description
League-agnostic version of epl.colors and friends: name the
league and the team and get the palette back. Handy when the league is itself a variable.
Usage
colorr.colors(league, set, legacy = FALSE)
Arguments
league |
Character string naming a league, as returned by
|
set |
Character string naming a team in that league. Team names retired since
colorr 1.0.1, namely |
legacy |
Logical. If |
Value
Named character vector of hex color strings.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
Examples
colorr.colors("nhl", "kraken")
colorr.colors("soccer", "real_madrid")
# the same palette either way
identical(colorr.colors("nba", "bucks"), nba.colors("bucks"))
Leagues covered by colorr
Description
Returns the league codes colorr knows about. Every code is a valid
league argument to colorr.teams, colorr.colors and
colorr.pal. The pseudo-league "soccer" is also accepted by those
functions and pools every soccer league into a single namespace.
Usage
colorr.leagues(soccer_only = FALSE)
Arguments
soccer_only |
Logical. If |
Value
Character vector of league codes.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
Examples
colorr.leagues()
colorr.leagues(soccer_only = TRUE)
Team color palette generator
Description
Turns a team palette into a palette function of the kind ggplot2 and
grDevices expect: call it with n and it returns n colors. When
n exceeds the number of colors the team actually has, the palette is interpolated
with colorRampPalette.
Usage
colorr.pal(league, set, reverse = FALSE, legacy = FALSE)
Arguments
league |
Character string naming a league, as returned by
|
set |
Character string naming a team in that league. |
reverse |
Logical. If |
legacy |
Logical. If |
Value
A function of one argument n returning a character vector of n hex
colors.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
scale_fill_nba and friends, which wrap this for ggplot2.
Examples
pal <- colorr.pal("nba", "bucks")
pal(3)
pal(8) # interpolated past the team's own colors
Teams covered by colorr
Description
Returns the team names accepted by a league's palette function. With no argument it returns a named list covering every league.
Usage
colorr.teams(league = NULL)
Arguments
league |
Character string naming a league, as returned by
|
Value
Character vector of team names, or a named list of them when league is
NULL.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
Examples
colorr.teams("wnba")
colorr.teams("ligue1")
# how many teams each league contributes
lengths(colorr.teams())
ggplot2 scales from an EPL team palette
Description
Colour and fill scales that take their colors from an EPL team, the
ggplot2 counterpart of epl.colors. scale_color_epl is an alias for
scale_colour_epl.
Usage
scale_colour_epl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_color_epl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_fill_epl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
Arguments
set |
Character string naming an EPL team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
Value
A ggplot2 scale, to be added to a plot with +.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
epl.colors for the raw palette, colorr.pal for the
palette function.
Examples
library(ggplot2)
ggplot(mtcars, aes(factor(cyl), mpg, fill = factor(cyl))) +
geom_boxplot() +
scale_fill_epl("man_united") # Manchester United
ggplot(mtcars, aes(wt, mpg, colour = hp)) +
geom_point(size = 3) +
scale_colour_epl("man_united", discrete = FALSE)
EPL colors
Description
Returns a named character vector of hex colors for an EPL team. Teams cover
the 2026-27 Premier League season, plus every club that appeared in colorr 1.0.1.
Call colorr.teams("epl") for the full list of team names.
Usage
epl.colors(
set = c("arsenal", "aston_villa", "bournemouth", "brentford", "brighton", "burnley",
"chelsea", "coventry_city", "crystal_palace", "everton", "fulham", "hull",
"ipswich_town", "leeds_united", "leicester", "liverpool", "man_city", "man_united",
"middlesbrough", "newcastle", "nottingham_forest", "southampton", "stoke_city",
"sunderland", "swansea_city", "tottenham", "watford", "west_bromich_albion",
"west_ham"),
legacy = FALSE
)
Arguments
set |
Character string naming an EPL team. |
legacy |
Logical. If |
Value
Named character vector of hex color strings.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
colorr.teams to list teams, scale_fill_epl for the
ggplot2 scales.
Examples
# Manchester United colors
pal <- epl.colors("man_united")
pal
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)
# Tottenham Hotspur colors
epl.colors("tottenham")
# the palette that shipped with colorr 1.0.1
epl.colors("man_united", legacy = TRUE)
ggplot2 scales from an MLB team palette
Description
Colour and fill scales that take their colors from an MLB team, the
ggplot2 counterpart of mlb.colors. scale_color_mlb is an alias for
scale_colour_mlb.
Usage
scale_colour_mlb(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_color_mlb(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_fill_mlb(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
Arguments
set |
Character string naming an MLB team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
Value
A ggplot2 scale, to be added to a plot with +.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
mlb.colors for the raw palette, colorr.pal for the
palette function.
Examples
library(ggplot2)
ggplot(mtcars, aes(factor(cyl), mpg, fill = factor(cyl))) +
geom_boxplot() +
scale_fill_mlb("rockies") # Colorado Rockies
ggplot(mtcars, aes(wt, mpg, colour = hp)) +
geom_point(size = 3) +
scale_colour_mlb("rockies", discrete = FALSE)
MLB colors
Description
Returns a named character vector of hex colors for an MLB team. Teams cover
the 2026 Major League Baseball season.
Call colorr.teams("mlb") for the full list of team names.
Usage
mlb.colors(
set = c("angels", "astros", "athletics", "blue_jays", "braves", "brewers", "cardinals",
"cubs", "diamondbacks", "dodgers", "giants", "guardians", "indians", "mariners",
"marlins", "mets", "nationals", "orioles", "padres", "phillies", "pirates",
"rangers", "rays", "red_sox", "reds", "rockies", "royals", "tigers", "twins",
"white_sox", "yankees"),
legacy = FALSE
)
Arguments
set |
Character string naming an MLB team.
The retired team name |
legacy |
Logical. If |
Value
Named character vector of hex color strings.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
colorr.teams to list teams, scale_fill_mlb for the
ggplot2 scales.
Examples
# Colorado Rockies colors
pal <- mlb.colors("rockies")
pal
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)
# Seattle Mariners colors
mlb.colors("mariners")
# the palette that shipped with colorr 1.0.1
mlb.colors("rockies", legacy = TRUE)
ggplot2 scales from an NBA team palette
Description
Colour and fill scales that take their colors from an NBA team, the
ggplot2 counterpart of nba.colors. scale_color_nba is an alias for
scale_colour_nba.
Usage
scale_colour_nba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_color_nba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_fill_nba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
Arguments
set |
Character string naming an NBA team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
Value
A ggplot2 scale, to be added to a plot with +.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
nba.colors for the raw palette, colorr.pal for the
palette function.
Examples
library(ggplot2)
ggplot(mtcars, aes(factor(cyl), mpg, fill = factor(cyl))) +
geom_boxplot() +
scale_fill_nba("bucks") # Milwaukee Bucks
ggplot(mtcars, aes(wt, mpg, colour = hp)) +
geom_point(size = 3) +
scale_colour_nba("bucks", discrete = FALSE)
NBA colors
Description
Returns a named character vector of hex colors for an NBA team. Teams cover
the 2026-27 NBA season, plus the Seattle SuperSonics.
Call colorr.teams("nba") for the full list of team names.
Usage
nba.colors(
set = c("blazers", "bucks", "bulls", "cavs", "celtics", "clippers", "grizzlies",
"hawks", "heat", "hornets", "jazz", "kings", "knicks", "lakers", "magic", "mavs",
"nets", "nuggets", "pacers", "pelicans", "pistons", "raptors", "rockets", "sixers",
"sonics", "spurs", "suns", "thunder", "warriors", "wizards", "wolves"),
legacy = FALSE
)
Arguments
set |
Character string naming an NBA team. |
legacy |
Logical. If |
Value
Named character vector of hex color strings.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
colorr.teams to list teams, scale_fill_nba for the
ggplot2 scales.
Examples
# Detroit Pistons colors
pal <- nba.colors("pistons")
pal
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)
# Milwaukee Bucks colors
nba.colors("bucks")
# the palette that shipped with colorr 1.0.1
nba.colors("pistons", legacy = TRUE)
ggplot2 scales from an NFL team palette
Description
Colour and fill scales that take their colors from an NFL team, the
ggplot2 counterpart of nfl.colors. scale_color_nfl is an alias for
scale_colour_nfl.
Usage
scale_colour_nfl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_color_nfl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_fill_nfl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
Arguments
set |
Character string naming an NFL team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
Value
A ggplot2 scale, to be added to a plot with +.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
nfl.colors for the raw palette, colorr.pal for the
palette function.
Examples
library(ggplot2)
ggplot(mtcars, aes(factor(cyl), mpg, fill = factor(cyl))) +
geom_boxplot() +
scale_fill_nfl("lions") # Detroit Lions
ggplot(mtcars, aes(wt, mpg, colour = hp)) +
geom_point(size = 3) +
scale_colour_nfl("lions", discrete = FALSE)
NFL colors
Description
Returns a named character vector of hex colors for an NFL team. Teams cover
the 2026 NFL season.
Call colorr.teams("nfl") for the full list of team names.
Usage
nfl.colors(
set = c("bears", "bengals", "bills", "broncos", "browns", "buccaneers", "cardinals",
"chargers", "chiefs", "colts", "commanders", "cowboys", "dolphins", "eagles",
"falcons", "giants", "jaguars", "jets", "lions", "niners", "packers", "panthers",
"patriots", "raiders", "rams", "ravens", "redskins", "saints", "seahawks",
"steelers", "texans", "titans", "vikings"),
legacy = FALSE
)
Arguments
set |
Character string naming an NFL team.
The retired team name |
legacy |
Logical. If |
Value
Named character vector of hex color strings.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
colorr.teams to list teams, scale_fill_nfl for the
ggplot2 scales.
Examples
# Detroit Lions colors
pal <- nfl.colors("lions")
pal
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)
# Denver Broncos colors
nfl.colors("broncos")
# the palette that shipped with colorr 1.0.1
nfl.colors("lions", legacy = TRUE)
ggplot2 scales from an NHL team palette
Description
Colour and fill scales that take their colors from an NHL team, the
ggplot2 counterpart of nhl.colors. scale_color_nhl is an alias for
scale_colour_nhl.
Usage
scale_colour_nhl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_color_nhl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_fill_nhl(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
Arguments
set |
Character string naming an NHL team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
Value
A ggplot2 scale, to be added to a plot with +.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
nhl.colors for the raw palette, colorr.pal for the
palette function.
Examples
library(ggplot2)
ggplot(mtcars, aes(factor(cyl), mpg, fill = factor(cyl))) +
geom_boxplot() +
scale_fill_nhl("kraken") # Seattle Kraken
ggplot(mtcars, aes(wt, mpg, colour = hp)) +
geom_point(size = 3) +
scale_colour_nhl("kraken", discrete = FALSE)
NHL colors
Description
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.
Usage
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
)
Arguments
set |
Character string naming an NHL team. |
legacy |
Logical. If |
Value
Named character vector of hex color strings.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
colorr.teams to list teams, scale_fill_nhl for the
ggplot2 scales.
Examples
# 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)
ggplot2 scales from a soccer team palette
Description
Colour and fill scales that take their colors from a soccer team, the
ggplot2 counterpart of soccer.colors. scale_color_soccer is an alias for
scale_colour_soccer.
Usage
scale_colour_soccer(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_color_soccer(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_fill_soccer(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
Arguments
set |
Character string naming a soccer team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
Value
A ggplot2 scale, to be added to a plot with +.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
soccer.colors for the raw palette, colorr.pal for the
palette function.
Examples
library(ggplot2)
ggplot(mtcars, aes(factor(cyl), mpg, fill = factor(cyl))) +
geom_boxplot() +
scale_fill_soccer("barcelona") # FC Barcelona
ggplot(mtcars, aes(wt, mpg, colour = hp)) +
geom_point(size = 3) +
scale_colour_soccer("barcelona", discrete = FALSE)
Soccer colors
Description
Returns a named character vector of hex colors for a soccer club. Covers
every club in the six leagues colorr tracks for the current season, plus the Premier
League clubs that shipped with colorr 1.0.1:
EPL (29), LaLiga (20), Serie A (20), Bundesliga (18), Ligue 1 (18), MLS (30).
Call colorr.teams("soccer") for the full list, or
colorr.teams("laliga") for one league at a time.
Usage
soccer.colors(
set = c("alaves", "angers", "arsenal", "aston_villa", "atalanta", "athletic_bilbao",
"atlanta_united", "atletico_madrid", "augsburg", "austin", "auxerre", "barcelona",
"bayern_munich", "bologna", "bournemouth", "brentford", "brest", "brighton",
"burnley", "cagliari", "celta_vigo", "cf_montreal", "charlotte", "chelsea",
"chicago_fire", "colorado_rapids", "columbus_crew", "como", "coventry_city",
"crystal_palace", "dc_united", "deportivo", "dortmund", "eintracht_frankfurt",
"elche", "elversberg", "espanyol",
"everton", "fc_cincinnati", "fc_dallas",
"fiorentina", "freiburg", "frosinone", "fulham", "genoa", "getafe", "hamburg",
"hoffenheim", "houston_dynamo", "hull", "inter", "inter_miami", "ipswich_town",
"juventus", "koln", "la_galaxy", "lafc", "lazio", "le_havre", "le_mans", "lecce",
"leeds_united", "leicester", "leipzig", "lens", "levante", "leverkusen", "lille",
"liverpool", "lorient", "lyon", "mainz", "malaga", "man_city", "man_united",
"marseille", "middlesbrough", "milan", "minnesota_united",
"monaco",
"monchengladbach", "monza", "napoli", "nashville", "new_england", "newcastle",
"nice", "nottingham_forest", "ny_red_bulls", "nycfc", "orlando_city", "osasuna",
"paderborn", "paris_fc", "parma", "philadelphia_union", "portland_timbers", "psg",
"racing_santander", "rayo_vallecano", "real_betis", "real_madrid", "real_salt_lake",
"real_sociedad", "rennes", "roma", "san_diego", "san_jose", "sassuolo", "schalke",
"seattle_sounders", "sevilla", "southampton", "sporting_kc", "st_louis_city",
"stoke_city", "strasbourg", "stuttgart", "sunderland", "swansea_city", "torino",
"toronto_fc", "tottenham", "toulouse", "troyes", "udinese", "union_berlin",
"valencia", "vancouver", "venezia", "villarreal", "watford", "werder_bremen",
"west_bromich_albion", "west_ham"),
legacy = FALSE
)
Arguments
set |
Character string naming a soccer club. |
legacy |
Logical. If |
Value
Named character vector of hex color strings.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
colorr.teams to list clubs, epl.colors for the
Premier League on its own, scale_fill_soccer for the ggplot2 scales.
Examples
# Bayern Munich colors
pal <- soccer.colors("bayern_munich")
pal
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)
# Inter Miami colors
soccer.colors("inter_miami")
# every LaLiga club colorr knows about
colorr.teams("laliga")
ggplot2 scales from a WNBA team palette
Description
Colour and fill scales that take their colors from a WNBA team, the
ggplot2 counterpart of wnba.colors. scale_color_wnba is an alias for
scale_colour_wnba.
Usage
scale_colour_wnba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_color_wnba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
scale_fill_wnba(set, discrete = TRUE, reverse = FALSE, legacy = FALSE, ...)
Arguments
set |
Character string naming a WNBA team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
Value
A ggplot2 scale, to be added to a plot with +.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
wnba.colors for the raw palette, colorr.pal for the
palette function.
Examples
library(ggplot2)
ggplot(mtcars, aes(factor(cyl), mpg, fill = factor(cyl))) +
geom_boxplot() +
scale_fill_wnba("liberty") # New York Liberty
ggplot(mtcars, aes(wt, mpg, colour = hp)) +
geom_point(size = 3) +
scale_colour_wnba("liberty", discrete = FALSE)
WNBA colors
Description
Returns a named character vector of hex colors for a WNBA team. Teams cover
the 2026 WNBA season, including the Portland Fire and Toronto Tempo expansion teams.
Call colorr.teams("wnba") for the full list of team names.
Usage
wnba.colors(
set = c("aces", "dream", "fever", "fire", "liberty", "lynx", "mercury", "mystics",
"sky", "sparks", "storm", "sun", "tempo", "valkyries", "wings"),
legacy = FALSE
)
Arguments
set |
Character string naming a WNBA team. |
legacy |
Logical. Ignored for the WNBA; colorr 1.0.1 shipped no WNBA palettes. Kept so every colorr palette function takes the same arguments. |
Value
Named character vector of hex color strings.
Author(s)
Charles Crabtree charles.crabtree@monash.edu
See Also
colorr.teams to list teams, scale_fill_wnba for the
ggplot2 scales.
Examples
# New York Liberty colors
pal <- wnba.colors("liberty")
pal
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)
# Golden State Valkyries colors
wnba.colors("valkyries")