feat: 144x144 transparent PNG app icon for Google Home action
TV + power glyph in brand orange (#D35400). Generator in scripts/make_icon.py. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user