79f1a7ec6e
- new icon source in icon/ (make_icon_v3.py + masters): near-black gradient tile, red record button with white bezel, mic capsule as a transcript card with red lines and a cursor - Android: adaptive icon uses the 512px master as the full-bleed background layer (launcher masks crop it to shape) with a transparent foreground; old vector foreground and launcher color removed - desktop: hicolor PNGs replaced at 32-512 px (48 regenerated from the master), old SVG removed; install.sh picks them up unchanged - APK installed on the Fairphone; aapt2 confirms the adaptive icon
66 lines
2.5 KiB
Python
66 lines
2.5 KiB
Python
#!/usr/bin/env python3
|
|
"""MeetRec icon v3 — mic/transcript glyph inside a big record button.
|
|
Gradient tile + soft shadow + large red record circle; the mic whose
|
|
capsule is a transcript card sits inside the button.
|
|
"""
|
|
import numpy as np
|
|
from PIL import Image, ImageDraw, ImageFilter
|
|
|
|
S = 512
|
|
RADIUS = 116
|
|
|
|
def vgrad(c_top, c_bot):
|
|
"""Vertical gradient as an RGB ndarray (S, S, 3)."""
|
|
c_top = np.array(c_top, dtype=float)
|
|
c_bot = np.array(c_bot, dtype=float)
|
|
t = (np.arange(S)[:, None, None] / (S - 1))
|
|
arr = c_top[None, None, :] * (1 - t) + c_bot[None, None, :] * t
|
|
return np.repeat(arr, S, axis=1).astype(np.uint8)
|
|
|
|
# --- Near-black tile background (subtle depth) ---
|
|
bg = vgrad((0x18, 0x18, 0x18), (0x00, 0x00, 0x00))
|
|
img = Image.fromarray(np.dstack([bg, np.full((S, S), 255, np.uint8)]), "RGBA")
|
|
|
|
# --- Rounded-square mask (app tile) ---
|
|
mask = Image.new("L", (S, S), 0)
|
|
ImageDraw.Draw(mask).rounded_rectangle([0, 0, S - 1, S - 1], radius=RADIUS, fill=255)
|
|
out = Image.new("RGBA", (S, S), (0, 0, 0, 0))
|
|
out.paste(img, (0, 0), mask)
|
|
|
|
# --- Big record button (red vertical gradient circle) ---
|
|
CX, CY, R = 256, 256, 176
|
|
red = vgrad((0xFF, 0x8A, 0x8A), (0xDD, 0x2B, 0x3A))
|
|
red_img = Image.fromarray(np.dstack([red, np.full((S, S), 255, np.uint8)]), "RGBA")
|
|
circ = Image.new("L", (S, S), 0)
|
|
ImageDraw.Draw(circ).ellipse([CX - R, CY - R, CX + R, CY + R], fill=255)
|
|
out.paste(red_img, (0, 0), circ)
|
|
|
|
d = ImageDraw.Draw(out)
|
|
WHITE = (255, 255, 255, 255)
|
|
REDINK = (0xD9, 0x26, 0x37, 255) # red "text" on the white card
|
|
|
|
# --- Button bezel ring ---
|
|
d.ellipse([CX - R - 14, CY - R - 14, CX + R + 14, CY + R + 14],
|
|
outline=(255, 255, 255, 190), width=6)
|
|
|
|
# --- Mic/transcript glyph (v2 design, centered in the button) ---
|
|
# Capsule = transcript card
|
|
d.rounded_rectangle([192, 117, 320, 277], radius=30, fill=WHITE)
|
|
# Text lines + typing cursor
|
|
d.rounded_rectangle([214, 149, 298, 161], radius=6, fill=REDINK)
|
|
d.rounded_rectangle([214, 181, 298, 193], radius=6, fill=REDINK)
|
|
d.rounded_rectangle([214, 213, 274, 225], radius=6, fill=REDINK)
|
|
d.rounded_rectangle([214, 245, 254, 257], radius=6, fill=REDINK)
|
|
d.rounded_rectangle([266, 242, 273, 260], radius=3, fill=REDINK)
|
|
# Cradle, stem, base
|
|
d.arc([178, 155, 334, 335], start=0, end=180, fill=WHITE, width=18)
|
|
d.line([256, 333, 256, 369], fill=WHITE, width=18)
|
|
d.rounded_rectangle([212, 365, 300, 387], radius=11, fill=WHITE)
|
|
|
|
# --- Export sizes ---
|
|
master = out.resize((1024, 1024), Image.LANCZOS)
|
|
for sz in [1024, 512, 256, 128, 64, 32]:
|
|
master.resize((sz, sz), Image.LANCZOS).save(f"meetrec-icon-v3-{sz}.png")
|
|
|
|
print("done")
|