Skip to content

Commit ba7b838

Browse files
committed
fixed background colour
1 parent 829f688 commit ba7b838

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

micropython/examples/tufty2040/display_png_offset_palette.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,21 @@
1111
TEXT = display.create_pen(0, 0, 0)
1212

1313
# 16 Reds
14-
for i in range(16):
14+
for i in range(15):
1515
display.create_pen(i * 16, 0, 0)
1616

1717
# 16 Greens
1818
for i in range(16):
1919
display.create_pen(0, i * 16, 0)
2020

2121
# 16 Blues
22-
for i in range(16):
22+
for i in range(15):
2323
display.create_pen(0, 0, i * 16)
2424

25+
# Adding in an white background colour at the beginning of each offset.
26+
for i in range(3):
27+
display.update_pen(i * 16, 200, 200, 200)
28+
2529
# Clear the screen
2630
display.set_pen(BG)
2731
display.clear()

0 commit comments

Comments
 (0)