Week ahead in the weather strip, reverse LCD at night
The weekday strip now shows today and the next six days (icon, max, min), the current temperature and feels-like sit next to the clock, and the rain graph spans the full width with the hour under every bar. From sunset to sunrise the whole frame, seconds patch included, is drawn as a reverse LCD. The rain label is now spelled DÉŠŤ. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
45508b1b68
commit
6c9a1420d2
10 files changed
+341
-122
No files matched your search
@@ -81,3 +81,22 @@ def test_tag_is_ink_box_and_returns_its_box():
|
||||
x0, y0, x1, y1 = box
|
||||
assert img.getpixel((x0 + 1, y0 + 1)) == INK
|
||||
assert x1 > x0 and y1 > y0
|
||||
|
||||
|
||||
def test_night_turns_background_dark_and_ink_light():
|
||||
img = Image.new("RGB", (3, 1), BG)
|
||||
img.putpixel((1, 0), INK)
|
||||
img.putpixel((2, 0), GHOST)
|
||||
bg, ink, ghost = (sum(lcdkit.night(img).getpixel((x, 0))) for x in range(3))
|
||||
assert bg < 100 and ink > 450
|
||||
# unlit segments stay faint: a little lighter than the background, nowhere near the ink
|
||||
assert bg < ghost < (bg + ink) / 2
|
||||
|
||||
|
||||
def test_night_keeps_antialiased_text_in_between():
|
||||
mid = tuple((a + b) // 2 for a, b in zip(INK, BG))
|
||||
img = Image.new("RGB", (3, 1), BG)
|
||||
img.putpixel((1, 0), INK)
|
||||
img.putpixel((2, 0), mid)
|
||||
bg, ink, edge = (sum(lcdkit.night(img).getpixel((x, 0))) for x in range(3))
|
||||
assert bg < edge < ink
|
||||
Reference in new issue
Block a user