| Title: | Color Palettes for Soccer, MLB, NBA, WNBA, NHL, and NFL Teams |
|---|---|
| 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. |
| Authors: | Charles Crabtree [aut, cre] |
| Maintainer: | Charles Crabtree <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.1.0 |
| Built: | 2026-10-08 12:37:47 UTC |
| Source: | https://github.com/lobsterbush/colorr |
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.
colorr.colors(league, set, legacy = FALSE)colorr.colors(league, set, legacy = FALSE)
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 |
Named character vector of hex color strings.
Charles Crabtree [email protected]
colorr.colors("nhl", "kraken") colorr.colors("soccer", "real_madrid") # the same palette either way identical(colorr.colors("nba", "bucks"), nba.colors("bucks"))colorr.colors("nhl", "kraken") colorr.colors("soccer", "real_madrid") # the same palette either way identical(colorr.colors("nba", "bucks"), nba.colors("bucks"))
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.
colorr.leagues(soccer_only = FALSE)colorr.leagues(soccer_only = FALSE)
soccer_only |
Logical. If |
Character vector of league codes.
Charles Crabtree [email protected]
colorr.leagues() colorr.leagues(soccer_only = TRUE)colorr.leagues() colorr.leagues(soccer_only = TRUE)
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.
colorr.pal(league, set, reverse = FALSE, legacy = FALSE)colorr.pal(league, set, reverse = FALSE, legacy = FALSE)
league |
Character string naming a league, as returned by
|
set |
Character string naming a team in that league. |
reverse |
Logical. If |
legacy |
Logical. If |
A function of one argument n returning a character vector of n hex
colors.
Charles Crabtree [email protected]
scale_fill_nba and friends, which wrap this for ggplot2.
pal <- colorr.pal("nba", "bucks") pal(3) pal(8) # interpolated past the team's own colorspal <- colorr.pal("nba", "bucks") pal(3) pal(8) # interpolated past the team's own colors
Returns the team names accepted by a league's palette function. With no argument it returns a named list covering every league.
colorr.teams(league = NULL)colorr.teams(league = NULL)
league |
Character string naming a league, as returned by
|
Character vector of team names, or a named list of them when league is
NULL.
Charles Crabtree [email protected]
colorr.teams("wnba") colorr.teams("ligue1") # how many teams each league contributes lengths(colorr.teams())colorr.teams("wnba") colorr.teams("ligue1") # how many teams each league contributes lengths(colorr.teams())
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.
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, ...)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, ...)
set |
Character string naming an EPL team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
A ggplot2 scale, to be added to a plot with +.
Charles Crabtree [email protected]
epl.colors for the raw palette, colorr.pal for the
palette function.
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)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)
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.
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 )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 )
set |
Character string naming an EPL team. |
legacy |
Logical. If |
Named character vector of hex color strings.
Charles Crabtree [email protected]
colorr.teams to list teams, scale_fill_epl for the
ggplot2 scales.
# 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)# 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)
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.
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, ...)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, ...)
set |
Character string naming an MLB team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
A ggplot2 scale, to be added to a plot with +.
Charles Crabtree [email protected]
mlb.colors for the raw palette, colorr.pal for the
palette function.
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)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)
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.
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 )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 )
set |
Character string naming an MLB team.
The retired team name |
legacy |
Logical. If |
Named character vector of hex color strings.
Charles Crabtree [email protected]
colorr.teams to list teams, scale_fill_mlb for the
ggplot2 scales.
# 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)# 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)
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.
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, ...)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, ...)
set |
Character string naming an NBA team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
A ggplot2 scale, to be added to a plot with +.
Charles Crabtree [email protected]
nba.colors for the raw palette, colorr.pal for the
palette function.
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)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)
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.
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 )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 )
set |
Character string naming an NBA team. |
legacy |
Logical. If |
Named character vector of hex color strings.
Charles Crabtree [email protected]
colorr.teams to list teams, scale_fill_nba for the
ggplot2 scales.
# 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)# 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)
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.
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, ...)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, ...)
set |
Character string naming an NFL team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
A ggplot2 scale, to be added to a plot with +.
Charles Crabtree [email protected]
nfl.colors for the raw palette, colorr.pal for the
palette function.
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)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)
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.
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 )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 )
set |
Character string naming an NFL team.
The retired team name |
legacy |
Logical. If |
Named character vector of hex color strings.
Charles Crabtree [email protected]
colorr.teams to list teams, scale_fill_nfl for the
ggplot2 scales.
# 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)# 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)
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.
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, ...)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, ...)
set |
Character string naming an NHL team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
A ggplot2 scale, to be added to a plot with +.
Charles Crabtree [email protected]
nhl.colors for the raw palette, colorr.pal for the
palette function.
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)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)
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 )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 [email protected]
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)# 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)
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.
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, ...)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, ...)
set |
Character string naming a soccer team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
A ggplot2 scale, to be added to a plot with +.
Charles Crabtree [email protected]
soccer.colors for the raw palette, colorr.pal for the
palette function.
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)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)
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.
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 )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 )
set |
Character string naming a soccer club. |
legacy |
Logical. If |
Named character vector of hex color strings.
Charles Crabtree [email protected]
colorr.teams to list clubs, epl.colors for the
Premier League on its own, scale_fill_soccer for the ggplot2 scales.
# 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")# 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")
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.
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, ...)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, ...)
set |
Character string naming a WNBA team. See |
discrete |
Logical. |
reverse |
Logical. If |
legacy |
Logical. If |
... |
Passed on to |
A ggplot2 scale, to be added to a plot with +.
Charles Crabtree [email protected]
wnba.colors for the raw palette, colorr.pal for the
palette function.
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)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)
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.
wnba.colors( set = c("aces", "dream", "fever", "fire", "liberty", "lynx", "mercury", "mystics", "sky", "sparks", "storm", "sun", "tempo", "valkyries", "wings"), legacy = FALSE )wnba.colors( set = c("aces", "dream", "fever", "fire", "liberty", "lynx", "mercury", "mystics", "sky", "sparks", "storm", "sun", "tempo", "valkyries", "wings"), legacy = FALSE )
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. |
Named character vector of hex color strings.
Charles Crabtree [email protected]
colorr.teams to list teams, scale_fill_wnba for the
ggplot2 scales.
# 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")# 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")