diff --git a/ios/Stemify/Resources/Assets.xcassets/AppIcon.appiconset/icon.png b/ios/Stemify/Resources/Assets.xcassets/AppIcon.appiconset/icon.png index 1e4ce50..168a535 100644 Binary files a/ios/Stemify/Resources/Assets.xcassets/AppIcon.appiconset/icon.png and b/ios/Stemify/Resources/Assets.xcassets/AppIcon.appiconset/icon.png differ diff --git a/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon-dark.png b/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon-dark.png index 4b05ee9..1e5e25e 100644 Binary files a/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon-dark.png and b/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon-dark.png differ diff --git a/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon-tinted.png b/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon-tinted.png index c97eaef..771b5ea 100644 Binary files a/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon-tinted.png and b/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon-tinted.png differ diff --git a/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon.png b/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon.png index 4b05ee9..1e5e25e 100644 Binary files a/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon.png and b/ios/Stemify/Resources/Assets.xcassets/AppIconDev.appiconset/icon.png differ diff --git a/ios/project.yml b/ios/project.yml index 63696e9..d6a1c4a 100644 --- a/ios/project.yml +++ b/ios/project.yml @@ -9,7 +9,7 @@ settings: # iOS needs a plain number for the bundle version; the label is what the app and releases show. MARKETING_VERSION: "0.9.0" VERSION_LABEL: "0.9.0" - CURRENT_PROJECT_VERSION: "36" + CURRENT_PROJECT_VERSION: "37" # Dev builds override these (build-ipa.sh dev) so they install next to the release app. APP_ID: org.cdnutter.stemify APP_NAME: Stemify diff --git a/ios/scripts/make-icon.py b/ios/scripts/make-icon.py new file mode 100644 index 0000000..24032ef --- /dev/null +++ b/ios/scripts/make-icon.py @@ -0,0 +1,101 @@ +"""Run from a venv with resvg-py and pillow: python make-icon.py OUTDIR +Stemify app icon: six stem-colored capsules (the app's stem palette) glowing on a deep night background. +Usage: make.py OUTDIR -> icon.png, icon-dev.png, icon-dev-dark.png, icon-dev-tinted.png""" +import io, sys +import resvg_py +from PIL import Image + +S = 1024 +# vocals, drums, bass, guitar, piano, other (PlaybackManager stem colors) +STEMS = [0xFF7AB6, 0xFFB547, 0x7C8CFF, 0xFF8A5C, 0xB48CFF, 0x4CD07D] +HEIGHTS = [300, 510, 390, 620, 455, 330] +W, GAP = 78, 30 + + +def hx(c): return f"#{c:06X}" +def mix(c, t, k): + a = [(c >> s) & 255 for s in (16, 8, 0)]; b = [(t >> s) & 255 for s in (16, 8, 0)] + return "#" + "".join(f"{round(x + (y - x) * k):02X}" for x, y in zip(a, b)) + + +def svg(mode="color", sash=False): + tint = mode == "tinted" + total = len(STEMS) * W + (len(STEMS) - 1) * GAP + x0 = (S - total) / 2 + cy = S / 2 + 6 + defs, glow, bars, shine = [], [], [], [] + for i, (c, h) in enumerate(zip(STEMS, HEIGHTS)): + if tint: c = 0xFFFFFF + x, y = x0 + i * (W + GAP), cy - h / 2 + defs.append(f'' + f'' + f'' + f'') + r = W / 2 + glow.append(f'') + bars.append(f'') + # glassy highlight down the left edge + shine.append(f'') + + if tint: + bg = '' + aura = "" + else: + bg = ('' + '' + '' + '') + # soft colored light pooling behind the bars + aura = ('' + f'' + f'' + f'' + f'' + f'' + '') + + vignette = ('' + '' + '') if not tint else "" + + sash_svg = "" + if sash: + sash_svg = ('' + '' + '' + '' + '' + '' + 'dev' + 'dev' + '') + + return f''' +{"".join(defs)} + + + + +{bg}{aura} +{"".join(glow)} +{"".join(g.replace('fill="#', 'fill="#000" data-c="') for g in glow)} +{"".join(bars)} +{"".join(shine)} +{vignette}{sash_svg} +''' + + +def png(s, path, gray=False): + im = Image.open(io.BytesIO(bytes(resvg_py.svg_to_bytes(svg_string=s)))).convert("RGB") + (im.convert("L") if gray else im).save(path, optimize=True) + + +out = sys.argv[1] +png(svg(), f"{out}/icon.png") +png(svg(sash=True), f"{out}/icon-dev.png") +png(svg(sash=True), f"{out}/icon-dev-dark.png") +png(svg("tinted", sash=True), f"{out}/icon-dev-tinted.png", gray=True) +open(f"{out}/icon.svg", "w").write(svg())