Pārlūkot izejas kodu

another MapperColorAdjust change

Thomas Buck 10 mēnešus atpakaļ
vecāks
revīzija
e14f3c2139
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4
    4
      mapper.py

+ 4
- 4
mapper.py Parādīt failu

@@ -48,16 +48,16 @@ class MapperNull:
48 48
 
49 49
 # For some reason the red and green LEDs on older Pimoroni panels
50 50
 # are far brighter than on newer panels.
51
-# Adjust this by multiplying rg channels with 0.75, depending
52
-# on hard-corded coordinate ranges.
51
+# Adjust this by multiplying rg channels with 0.75 and b channel
52
+# with 0.85, depending on hard-corded coordinate ranges.
53 53
 class MapperColorAdjust(MapperNull):
54 54
     def set_pixel(self, x, y, color):
55 55
         # second panel from the left, with 32 <= x,
56 56
         # is "old" type with brighter LEDs.
57 57
         # rest of panels to the left are less bright.
58
-        # so adjust brightness of other panel rg channels down.
58
+        # so adjust brightness of other panel channels down.
59 59
         if x >= self.gui.panelW:
60
-            color = (int(color[0] * 0.75), int(color[1] * 0.75), color[2])
60
+            color = (int(color[0] * 0.75), int(color[1] * 0.75), color[2] * 0.85)
61 61
 
62 62
         self.gui.set_pixel(x, y, color)
63 63
 

Notiek ielāde…
Atcelt
Saglabāt