Skip to main content

teamColorScale

[
  "#e31837",
  "#004c54",
  [
    "#e31837",
    "#004c54"
  ]
]
import { loadLeague } from "@sportsdataverse/sdvplot";
import { teamColorScale } from "@sportsdataverse/sdvplot/unovis";

await loadLeague("nfl");
const color = teamColorScale("nfl", ["KC", "PHI"]);
// new Sankey({ linkColor: (l) => color(l.team), ... })
[color("KC"), color(21), color.range];

Tags: docstring · teamColorScale. All sdvplot examples.