"""HUD face for the RC remote, 512x256. v3 (2026-10-16): three columns: DRIVE | LIGHTS over HORN | CAM. rc_remote.lsl reads touches by these thirds (x < 1/3 drive, x > 2/3 camera, middle: top lights, bottom horn). Claude Opus 5.5 (Tessel), 2026-10-12; v3 2026-10-16.""" import os from PIL import Image, ImageDraw, ImageFont W, H = 512, 256 C = W // 3 im = Image.new("RGB", (W, H), (24, 24, 30)) d = ImageDraw.Draw(im) d.rounded_rectangle((6, 6, C - 3, H - 6), 20, fill=(170, 28, 30)) d.rounded_rectangle((C + 3, 6, 2 * C - 3, H // 2 - 3), 18, fill=(206, 168, 52)) d.rounded_rectangle((C + 3, H // 2 + 3, 2 * C - 3, H - 6), 18, fill=(60, 120, 176)) d.rounded_rectangle((2 * C + 3, 6, W - 6, H - 6), 20, fill=(48, 52, 64)) try: big = ImageFont.truetype("arialbd.ttf", 38) mid = ImageFont.truetype("arialbd.ttf", 26) small = ImageFont.truetype("arial.ttf", 16) except OSError: big = mid = small = ImageFont.load_default() # DRIVE: a little wedge car cx, cy = C // 2, 88 d.polygon([(cx - 60, cy + 18), (cx + 58, cy + 8), (cx + 52, cy - 5), (cx - 8, cy - 24), (cx - 52, cy - 18)], fill=(245, 236, 230)) for wx in (cx - 34, cx + 32): d.ellipse((wx - 12, cy + 6, wx + 12, cy + 30), fill=(20, 20, 20)) d.text((cx, 178), "DRIVE", font=big, fill="white", anchor="mm") d.text((cx, 224), "start / stop", font=small, fill=(255, 210, 200), anchor="mm") # LIGHTS: two beams mx = C + C // 2 d.ellipse((mx - 46, 30, mx - 22, 54), fill=(255, 250, 220)) d.polygon([(mx - 26, 34), (mx + 40, 22), (mx + 40, 62), (mx - 26, 50)], fill=(255, 238, 170)) d.text((mx, 94), "LIGHTS", font=mid, fill=(40, 30, 10), anchor="mm") # HORN: a little trumpet hy = H // 2 + 42 d.polygon([(mx - 40, hy - 6), (mx + 6, hy - 6), (mx + 36, hy - 24), (mx + 36, hy + 24), (mx + 6, hy + 6), (mx - 40, hy + 6)], fill=(235, 242, 250)) d.text((mx, H - 34), "HORN", font=mid, fill="white", anchor="mm") # CAM: a camera c2 = 2 * C + C // 2 d.rounded_rectangle((c2 - 40, 62, c2 + 28, 112), 8, fill=(220, 224, 232)) d.polygon([(c2 + 28, 76), (c2 + 52, 64), (c2 + 52, 110), (c2 + 28, 98)], fill=(220, 224, 232)) d.text((c2, 178), "CAM", font=big, fill="white", anchor="mm") d.text((c2, 224), "chase / bumper", font=small, fill=(200, 210, 230), anchor="mm") out = os.path.join(os.path.dirname(os.path.abspath(__file__)), "hud.png") im.save(out) print(out)