-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprecipcolors.py
36 lines (36 loc) · 1.27 KB
/
precipcolors.py
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
35
36
class PrecipColors:
def getColor(condition):
if condition == "Thunderstorms Possible":
return 'red'
elif condition == "Thunderstorms Likely":
return 'darkred'
elif condition == "Cloudy":
return 'gray'
elif condition == "Partly Cloudy":
return 'gainsboro'
elif condition == "Very Light Rain":
return 'lightgoldenrodyellow'
elif condition == "Light Rain":
return 'palegreen'
elif condition == "Rain Possible":
return 'aquamarine'
elif condition == "Rain Likely":
return 'limegreen'
elif condition == "Moderate Rain":
return 'mediumseagreen'
elif condition == "Heavy Rain":
return 'green'
elif condition == "Extreme Rain":
return 'darkgreen'
elif condition == 'Snow Possible':
return 'aqua'
elif condition == 'Snow Likely':
return 'blue'
elif condition == 'Wintery Mix Possible':
return 'violet'
elif condition == 'Wintery Mix Likely':
return 'darkviolet'
elif condition == "Clear":
return 'white'
else:
raise Exception("Invalid condition received: " + condition)