Fine tuned color values

This commit is contained in:
Maximilian Giller 2019-03-10 16:05:42 +01:00
parent e4f77aff7c
commit 895a7cda1c

View file

@ -65,9 +65,9 @@ class Epd7in5bAdapter (EpdAdapter):
def __get_color__ (self, pixel): def __get_color__ (self, pixel):
color_percent = self.__get_color_percentage__(pixel) color_percent = self.__get_color_percentage__(pixel)
brightness = self.__brightness__(pixel) brightness = self.__brightness__(pixel)
if brightness > 240 or (brightness > 200 and color_percent[0] > 35): if brightness > 240 or (brightness > 220 and color_percent[0] > 40):
return 'white' return 'white'
elif color_percent[0] > 40: elif color_percent[0] > 35:
return 'red' return 'red'
else: else:
return 'black' return 'black'