diff --git a/dist/com.astar76.cookie-glass@1.3.1.zip b/dist/com.astar76.cookie-glass@1.3.1.zip deleted file mode 100644 index fbe3927..0000000 Binary files a/dist/com.astar76.cookie-glass@1.3.1.zip and /dev/null differ diff --git a/dist/com.astar76.cookie-glass@1.4.0.zip b/dist/com.astar76.cookie-glass@1.4.0.zip new file mode 100644 index 0000000..22fe3d0 Binary files /dev/null and b/dist/com.astar76.cookie-glass@1.4.0.zip differ diff --git a/index.json b/index.json index 5515231..1f1d0ab 100644 --- a/index.json +++ b/index.json @@ -8,13 +8,13 @@ "description": "Material 3 Expressive mauve theme with drifting cookie / flower shapes behind see-through panels, Figtree font and Material Symbols icons.", "author": "astar76", "channels": { - "latest": "1.3.1" + "latest": "1.4.0" }, "versions": { - "1.3.1": { - "url": "https://astar76sites.parore-gila.ts.net/git/astar76/cookie-glass-valenced/raw/branch/main/dist/com.astar76.cookie-glass@1.3.1.zip", - "sha256": "6ea2084b1a3231509e84abbc9c5a1f1aa12941e6ff7903c6386ac493a213b13a", - "size": 218991, + "1.4.0": { + "url": "https://astar76sites.parore-gila.ts.net/git/astar76/cookie-glass-valenced/raw/branch/main/dist/com.astar76.cookie-glass@1.4.0.zip", + "sha256": "e3f01013102670d7a2a117523abe11ee0559170cc14163b20a4c4d5ccd76b92c", + "size": 1969874, "dependencies": { "valenced.api": { "version": ">=1 <2" diff --git a/themes/cookie-glass/assets/background-frosted.gif b/themes/cookie-glass/assets/background-frosted.gif deleted file mode 100644 index 8d2ddf9..0000000 Binary files a/themes/cookie-glass/assets/background-frosted.gif and /dev/null differ diff --git a/themes/cookie-glass/js/colors.ts b/themes/cookie-glass/js/colors.ts index 86c296f..4e5b3fb 100644 --- a/themes/cookie-glass/js/colors.ts +++ b/themes/cookie-glass/js/colors.ts @@ -101,6 +101,12 @@ export const Semantic: Record = { "CONTROL_SECONDARY_BACKGROUND_DEFAULT": "#392f38", "BUTTON_FILLED_BRAND_BACKGROUND": "#edbaea", "BUTTON_FILLED_BRAND_TEXT": "#361b35", + "BUTTON_FILLED_BRAND_BACKGROUND_HOVER": "#d7a3d5", + "BUTTON_FILLED_BRAND_BACKGROUND_ACTIVE": "#c491c1", + "BUTTON_FILLED_BRAND_INVERTED_TEXT": "#edbaea", + "REDESIGN_BUTTON_ACTIVE_BACKGROUND": "#edbaea", + "REDESIGN_BUTTON_ACTIVE_TEXT": "#361b35", + "CONTROL_BRAND_FOREGROUND_ACTIVE": "#d7a3d5", "MENTION_BACKGROUND": "#edbaea38", "MENTION_FOREGROUND": "#edbaea", "FOCUS_PRIMARY": "#edbaea", @@ -109,9 +115,30 @@ export const Semantic: Record = { } export const Raw: Record = { + "BRAND_100": "#ffe1ff", + "BRAND_130": "#ffdfff", + "BRAND_160": "#ffdcff", + "BRAND_200": "#ffd8ff", + "BRAND_230": "#ffd5ff", + "BRAND_260": "#ffd2ff", + "BRAND_300": "#ffcefe", + "BRAND_330": "#fecbfb", + "BRAND_345": "#fcc9fa", + "BRAND_360": "#fbc8f8", + "BRAND_400": "#f7c4f4", + "BRAND_430": "#f4c1f1", + "BRAND_460": "#f1beee", "BRAND_500": "#edbaea", - "BRAND_400": "#edbaea", - "BRAND_360": "#edbaea", - "BRAND_560": "#d7a3d5", - "BRAND_600": "#c491c1" + "BRAND_530": "#e2addf", + "BRAND_560": "#d6a2d3", + "BRAND_600": "#c592c3", + "BRAND_630": "#b987b7", + "BRAND_660": "#ad7bab", + "BRAND_700": "#9d6d9c", + "BRAND_730": "#926290", + "BRAND_760": "#865785", + "BRAND_800": "#774976", + "BRAND_830": "#6c3f6b", + "BRAND_860": "#613460", + "BRAND_900": "#532752" } diff --git a/themes/cookie-glass/js/index.ts b/themes/cookie-glass/js/index.ts index 16a56c9..eb6e803 100644 --- a/themes/cookie-glass/js/index.ts +++ b/themes/cookie-glass/js/index.ts @@ -11,9 +11,6 @@ import type { FontVariant, ThemeColors } from '@valenced/themes-api/types' const Group = 'cookie-glass' -// Animated GIFs stream from the Forgejo repo instead of shipping in the zip, so installs stay small. -const Remote = - 'https://astar76sites.parore-gila.ts.net/git/astar76/cookie-glass-valenced/raw/branch/main/themes/cookie-glass/assets/' const colors = (): ThemeColors => ({ // Same dark palette on Ash, Dark and Onyx. Light keeps Discord's colors. @@ -51,7 +48,7 @@ export default plugin({ name: 'Cookie Glass', description: 'Drifting shapes (animated GIF, works on iOS and Android)', getColors: colors, - background: { path: `${Remote}background-animated.gif`, dimming: Dimming }, + background: { path: 'assets/background-animated.gif', dimming: Dimming }, }) @@ -62,12 +59,6 @@ export default plugin({ background: { path: 'assets/background.png', dimming: Dimming }, }) - themes.registerTheme(Group, 'frosted', { - name: 'Cookie Glass (frosted)', - description: 'Softly blurred drifting shapes (blur is baked into the GIF)', - getColors: colors, - background: { path: `${Remote}background-frosted.gif`, dimming: Dimming }, - }) themes.registerFontPack(Group, 'figtree', { name: 'Figtree', diff --git a/themes/cookie-glass/manifest.json b/themes/cookie-glass/manifest.json index 7622722..8290f52 100644 --- a/themes/cookie-glass/manifest.json +++ b/themes/cookie-glass/manifest.json @@ -4,7 +4,7 @@ "name": "Cookie Glass", "description": "Material 3 Expressive mauve theme with drifting cookie / flower shapes behind see-through panels, Figtree font and Material Symbols icons.", "author": "astar76", - "version": "1.3.1", + "version": "1.4.0", "dependencies": { "valenced.api": { "version": ">=1 <2" diff --git a/tools/background.py b/tools/background.py index db210f8..8646b05 100644 --- a/tools/background.py +++ b/tools/background.py @@ -12,7 +12,6 @@ HUE = float(sys.argv[2]) if len(sys.argv) > 2 else 328 W, H = 720, 1600 FRAMES, FPS = 90, 9 # 10 s loop GIF_W = 360 -FROST_W, FROST = 180, 3 # frosted GIF: half size (blur hides it, keeps the file small) and blur radius in px OUT = pathlib.Path(__file__).resolve().parent.parent / 'themes/cookie-glass/assets' def path_of(name): @@ -78,10 +77,8 @@ with tempfile.TemporaryDirectory(dir=pathlib.Path.home() / '.cache') as tmp: render(0, tmp).save(OUT / 'background.png', optimize=True) frames = [render(f / FRAMES, tmp) for f in range(FRAMES)] # GIFs for iOS, whose image view only animates GIFs. One shared palette keeps colors steady between frames. - from PIL import ImageFilter small = [fr.resize((GIF_W, round(H * GIF_W / W)), Image.LANCZOS) for fr in frames] - for name, imgs in (('background-animated.gif', small), - ('background-frosted.gif', [fr.resize((FROST_W, round(H * FROST_W / W)), Image.LANCZOS).filter(ImageFilter.GaussianBlur(FROST)) for fr in frames])): + for name, imgs in (('background-animated.gif', small),): for i, im in enumerate(imgs): im.save(pathlib.Path(tmp) / f'{i:03d}.png') subprocess.run(['ffmpeg', '-v', 'error', '-y', '-framerate', str(FPS), '-i', str(pathlib.Path(tmp) / '%03d.png'), diff --git a/tools/package.sh b/tools/package.sh index fa735c1..390d24b 100755 --- a/tools/package.sh +++ b/tools/package.sh @@ -13,7 +13,6 @@ for dir in themes/*/ plugins/*/; do stage=$(mktemp -d -p "$HOME/.cache") cp "$dir/manifest.json" "$dir/build/js/index.js" "$stage/" [ -d "$dir/assets" ] && cp -r "$dir/assets" "$stage/assets" - rm -f "$stage"/assets/*.gif # theme GIFs load from the repo at runtime (see themes/cookie-glass/js/index.ts) rm -f "dist/$id.zip" (cd "$stage" && zip -qr -X "$OLDPWD/dist/$id.zip" .) rm -rf "$stage" diff --git a/tools/palette.py b/tools/palette.py index 289f6a7..1baa455 100644 --- a/tools/palette.py +++ b/tools/palette.py @@ -86,11 +86,21 @@ def main(): 'CONTROL_BRAND_FOREGROUND': c['primary'], 'CONTROL_BRAND_FOREGROUND_NEW': c['primary'], 'CONTROL_PRIMARY_BACKGROUND_DEFAULT': c['primary'], 'CONTROL_SECONDARY_BACKGROUND_DEFAULT': c['s5'], 'BUTTON_FILLED_BRAND_BACKGROUND': c['primary'], 'BUTTON_FILLED_BRAND_TEXT': c['on_primary'], + 'BUTTON_FILLED_BRAND_BACKGROUND_HOVER': c['brand_560'], 'BUTTON_FILLED_BRAND_BACKGROUND_ACTIVE': c['brand_600'], + 'BUTTON_FILLED_BRAND_INVERTED_TEXT': c['primary'], 'REDESIGN_BUTTON_ACTIVE_BACKGROUND': c['primary'], + 'REDESIGN_BUTTON_ACTIVE_TEXT': c['on_primary'], 'CONTROL_BRAND_FOREGROUND_ACTIVE': c['brand_560'], 'MENTION_BACKGROUND': c['mention_bg'], 'MENTION_FOREGROUND': c['primary'], 'FOCUS_PRIMARY': c['primary'], 'SCROLLBAR_THIN_THUMB': '#00000000', 'SCROLLBAR_AUTO_THUMB': '#00000000', } - RAW = {'BRAND_500': c['primary'], 'BRAND_400': c['primary'], 'BRAND_360': c['primary'], - 'BRAND_560': c['brand_560'], 'BRAND_600': c['brand_600']} + # Discord's whole blurple ramp, so every brand-colored control (send button included) turns mauve. + # 500 is the theme's primary; lighter steps rise toward white, darker steps fall toward the surfaces. + def brand(n): + L = 0.97 - (n - 100) * 0.0003 if n <= 500 else 0.85 - (n - 500) * 0.00125 + return oklch(L, (0.085 if n <= 500 else 0.09) * K, H) + steps = (100, 130, 160, 200, 230, 260, 300, 330, 345, 360, 400, 430, 460, 500, + 530, 560, 600, 630, 660, 700, 730, 760, 800, 830, 860, 900) + RAW = {f'BRAND_{n}': brand(n) for n in steps} + RAW['BRAND_500'] = c['primary'] out = sys.stdout out.write('// Generated by tools/palette.py from the desktop Cookie Glass palette. Do not edit by hand.\n\n')