File size: 861 Bytes
054cb4d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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")