draft-day-cards / utils.py
patrickramos's picture
Add missing utils.py
054cb4d
Raw History Blame Contribute Delete
861 Bytes
from pyfonts import load_google_font
team_to_color = {
"Yomiuri Giants": "#f69727",
"Yakult Swallows": "#abcd05",
"DeNA BayStars": "#004a8f",
"Chunichi Dragons": "#08b1e8",
"Hanshin Tigers": "#ffe100",
"Hiroshima Carp": "#f92b20",
"Nippon-Ham Fighters": "#016299",
"Rakuten Eagles": "#7d001a",
"Seibu Lions": "#00214b",
"Chiba Lotte Marines": "#efefef",
"Orix Buffaloes": "#baa834",
"SoftBank Hawks": "#fcc700",
}
def get_text_color_from_team(team):
if team in [
"DeNA BayStars",
"Nippon-Ham Fighters",
"Seibu Lions",
"Rakuten Eagles",
]:
return "white"
else:
return "black"
font = load_google_font("Saira Extra Condensed", weight="medium")
bold_font = load_google_font("Saira Extra Condensed", weight="bold")
alt_font = load_google_font("Ubuntu")