Color update
This commit is contained in:
parent
8d1c431546
commit
16d5b971ab
6
clock.py
6
clock.py
|
@ -282,7 +282,7 @@ class MyClockWidget(FloatLayout):
|
|||
|
||||
aqi_colors = [
|
||||
[0.0, 0.0, 0.0], # x < 1.0 black (good)
|
||||
[0.0, 0.0, 255.0/255.0], # 1.0 <= x < 2.0 blue (good)
|
||||
[0.3, 0.3, 255.0/255.0], # 1.0 <= x < 2.0 blue (good)
|
||||
[0.0, 160.0/255.0, 160.0/255.0], # 2.0 <= x < 3.0 cyan (good)
|
||||
[1.0, 1.0, 1.0], # 3.0 <= x < 4.0 white (mediocre)
|
||||
[1.0, 1.0, 150.0/255.0], # 4.0 <= < x 5.0 light yellow (mediocre)
|
||||
|
@ -291,7 +291,7 @@ class MyClockWidget(FloatLayout):
|
|||
[1.0, 120.0/255.0, 0.0], # 7.0 <= x < 8.0 red orange (inadequate)
|
||||
[200.0/255.0, 0.0, 0.0], # 8.0 <= x < 9.0 red (bad)
|
||||
[200.0/255.0, 0.0, 200.0/255.0], # 9.0 <= x < 10.0 magenta (bad)
|
||||
[70.0/255.0, 0.0, 255.0/255.0], # 10.0 <= x purple (terrible)
|
||||
[100.0/255.0, 0.0, 200.0/255.0], # 10.0 <= x purple (terrible)
|
||||
]
|
||||
|
||||
precipitation = []
|
||||
|
@ -334,8 +334,8 @@ class MyClockWidget(FloatLayout):
|
|||
t = datetime.datetime.now().timestamp()
|
||||
j = json.loads(response.text)
|
||||
|
||||
# self.precipitation = [0, 0.1, 0.22, 0.47, 1, 2.2, 4.7, 10, 22, 47, 100]
|
||||
self.precipitation = self.get_air_quality_metric(j, t, "precipitation", 300)
|
||||
# self.precipitation = [0, 0.1, 0.22, 0.47, 1, 2.2, 4.7, 10, 22, 47, 100]
|
||||
self.pollen = self.get_air_quality_metric(j, t, "pollen", 3600)
|
||||
self.aqi = self.get_air_quality_metric(j, t, "AQI", 3600)
|
||||
self.paqi = self.get_air_quality_metric(j, t, "PAQI", 3600)
|
||||
|
|
Loading…
Reference in New Issue