diff --git a/.gitignore b/.gitignore index 24943d3..6c8bcfa 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ __pycache__/ *.new lgtv.env .env + +# service-account key (secret — never commit) +*.json +seth-freiberg-*.json diff --git a/assets/google-home-icon-144.png b/assets/google-home-icon-144.png new file mode 100644 index 0000000..f8fe1e9 Binary files /dev/null and b/assets/google-home-icon-144.png differ diff --git a/scripts/make_icon.py b/scripts/make_icon.py new file mode 100644 index 0000000..270d909 --- /dev/null +++ b/scripts/make_icon.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +"""Generate a 144x144 transparent PNG app icon for the Google Home action. + +A TV with a power symbol on the screen, in Seth's brand orange (#D35400). +Drawn at 4x (576px) and downscaled with LANCZOS for crisp anti-aliased edges. +""" +from PIL import Image, ImageDraw + +S = 576 # supersampled canvas +ORANGE = (211, 84, 0, 255) # #D35400 +SCREEN = (255, 255, 255, 255) + +img = Image.new("RGBA", (S, S), (0, 0, 0, 0)) +d = ImageDraw.Draw(img) + +# TV frame (rounded rect) +d.rounded_rectangle([(48, 92), (528, 428)], radius=48, fill=ORANGE) +# Screen +d.rounded_rectangle([(86, 130), (490, 390)], radius=26, fill=SCREEN) +# Stand neck + base +d.rectangle([(258, 428), (318, 458)], fill=ORANGE) +d.rounded_rectangle([(196, 458), (380, 484)], radius=13, fill=ORANGE) + +# Power symbol on the screen (arc with a gap at top + vertical line) +cx, cy, r = 288, 262, 66 +d.arc([(cx - r, cy - r), (cx + r, cy + r)], start=300, end=240, fill=ORANGE, width=28) +d.line([(cx, 172), (cx, 256)], fill=ORANGE, width=28) +# round the line caps +for y in (172, 256): + d.ellipse([(cx - 14, y - 14), (cx + 14, y + 14)], fill=ORANGE) + +out = Image.alpha_composite(Image.new("RGBA", (S, S), (0, 0, 0, 0)), img) +out = out.resize((144, 144), Image.LANCZOS) +out.save("assets/google-home-icon-144.png") +print("wrote assets/google-home-icon-144.png", out.size, out.mode)