Learn R Programming

colorr (version 1.1.0)

colorr.colors: 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)

Value

Named character vector of hex color strings.

Arguments

league

Character string naming a league, as returned by colorr.leagues, or "soccer" for every soccer club at once.

set

Character string naming a team in that league. Team names retired since colorr 1.0.1, namely "indians" and "redskins", still resolve to the renamed franchise.

legacy

Logical. If TRUE, return the palette that shipped with colorr 1.0.1.

Author

Charles Crabtree [email protected]

Examples

Run this code
colorr.colors("nhl", "kraken")
colorr.colors("soccer", "real_madrid")

# the same palette either way
identical(colorr.colors("nba", "bucks"), nba.colors("bucks"))

Run the code above in your browser using DataLab